Posts Tagged ‘PCB’

h1

Fully-assembled boards

2011/06/07

I got a call yesterday that triggered a mad dash to try to get to Canby by 5pm to grab the freshly assembled PCBs.  Not sure they wouldn’t have answered after 5pm, but didn’t want to take the chance, eh? ;-)

The only error was actually caused by Digikey, where somehow they managed to stick a cut tape of some random SOT23-5 part inside a bag marked for SC70-6 parts…  I’ll have to figure that one out with them and mount those parts myself.  Luckily those are on the controller boards, of which there are only 3.

I have to assemble the 3rd board of each stack myself, because I ran them on the DorkbotPDX group order.  That’s because they’re simple by design, so I can run variations more frequently (and cheaper) as I work on fine-tuning that part of the product.  That and the debug board (which I have to solder a cable to) bracket the above boards, making the whole thing quite colorful ;-)

Part of my design is careful re-usability of parts.  The interface boards I’ve designed for upgradability are also snapped onto the controller, so if I come up with a better version I can replace the controller’s interface just as easily as all the others.

The next step of course is to bootstrap them, which is always a very nerve-wracking procedure…  It begs the question though: if the boards are red and purple, what color of smoke should come out if something goes wrong???

h1

Panelizing PCB & Assembly: prepping the boards

2011/05/26

In my quest to get a group of PCBs fab’d and assembled as inexpensively as possible, the first step of course is getting the artwork for the individual PCBs ready.  Once the schematic is finalized and the basic layout is done, additional steps need to be taken in order to make then panel-friendly, and actually get the artwork together into one chunk.

Read the rest of this entry ?

h1

The joys of PCB & Assembly panelization

2011/05/24

I’m working on the latest round of prototyping for the product I’m working on.  This time there are a number of factors that are forcing me to change from my previous development methodology.  First and foremost, there’s a lot more pressure to get it done fast rather than cheap, so a major factor is the reduction of unknowns like low assembly yield that were making the process rather slow.  Second, I’ve shuffled things around in the design in ways that both call for tighter design rules than the DorkbotPDX group order provides, and make assembly even trickier to do by hand.

The project itself consists of a whole series of different PCBs.  The main group of 3 boards stack on top of each other, while the controller has a site to stack on the top board from the first stack, then itself live on a larger board that I haven’t finalized yet.  Because of the small quantities of boards and the diversity of the design, panelizing them turns out to save quite a bit of money.  I’m currently running 2 of the main stack plus the first board of the controller.  If I ordered PCBs separately, it’d run about $1500.  Panelized, they came in under $600.  Assembly for each of the jobs separately would run around $3300 based on mostly-accurate numbers, but the panel drops that to around $2200.  Overall I’m saving around $2000 by panelizing.

The downside is that it’s a rather complicated process.  I’ve worked for the last week trying to get everything in order so EpecTec and Screaming Circuits don’t end up with major problems because of what I send them…  However, once it’s figured out the first time, I can do subsequent panelized runs with a lot less effort.  And thanks to the wonders of Open Source, I’m hoping others out there will be able to do the same because of the scripts I’m writing.

I’m going to see if I can make enough time in the next few days to note down most of the issues I’ve run into, and hopefully save others some trouble in doing so.  First up will be setting up the PCBs and panelizing them.

h1

Abirtrary clock generation (with benefits)

2010/09/16

The product I’m working on right now has a load of very arcane requirements, forcing me to delve into areas totally new to me.  One of those is precision clocking, since the product requires synchronized capture of data across multiple units.  As such I went hunting for PLLs that would do the job I need.  The key is the ability to adjust the speed very slightly in order to synchronize multiple clocks on multiple units to the exact same speed over the long term.

TI’s CDCE9xx series of chips turned out to have all the right features.  Each chip in the series has an onboard VCXO, which allows me to tweak the exact speed of the crystal with a voltage input, up to +-150ppm.  The various chips in the line have differing numbers of PLLs, each with 2 outputs on separate dividers.  The 12+9 bit N/M divider and 7-bit predivider allow for almost any sane clock speed you can dream up.  Coupled with the right crystal, it does exactly what I need.

But, there’s the problem.  TI specifies a whole mess of arcane crystal parameters needed in order to make the pullable VCXO actually work.  The catch is that nobody selling crystals actually publishes most of those numbers.  That means that you can neither determine the pullability range of a given crystal, nor find a crystal that actually works.  They list a number of specific crystals that “should work”, but not only are those datasheets no more help, but nobody (Digikey, Newark, Mouser, or anybody else I can buy from) sells them.  Hard stop.

Well, as I was looking through the listed vendors hoping to get my hands on some at least some samples, I tried to focus on US-based companies so I could actually communicate with them (all the others are in China etc).  Turns out Pletronics is based in Lynnwood, Washington, just a couple hundred miles north of here.  I sent them an email asking if they could point me to a crystal that’s supposed to work with and be pullable by the CDCE9xx series, and got back an answer that surprised me, and made my week.  They happen to sell a part that’s a CDCE9xx and matching crystal in one package!

The FD77T is the biggest of that line, based on the CDCE949.  The package is all of 5x7mm, which is ever so slightly larger than the CDCE913 alone (5×6.4mm), and noticeable smaller than the CDCE949 (7.8×6.4mm).  Compared to the CDCE949, crystal, and related parts, it’s radically smaller and easier to deal with.  It takes VCCIO, VCCINT, I2C, and VCXO control and spits out 7 PLL outputs, end of story.  The smaller versions (FD7[345]T) have fewer PLLs and outputs, but in the exact same package.  Pletronics seems to stock the FD77T for at least sample quantities with 24MHz, 24.576MHz, and 25MHz crystals.

The kicker is that the 1,000 unit pricing I was quoted was in the $2.50 range.  That’s cheaper than either the CDCE913 or the high-spec crystal separately!

In order to do testing, I made up a tiny adapter board for the FD77T that brings out all the pins, supplies the 1.8V VCCINT, and adds an extra set of top-side headers for the I2C programming interface:

In order to program the actual chip, you have to set up a rather complex sequence of registers.  TI provides a program called ClockPro that does it for you, but it seems to be written in MatLab and is ludicrously slow.  To top it off, it’s Windoze only and doesn’t provide any easy way of getting the register values out in a form that can be programmed in.  I’ve had to resort to literally typing in hex from the binary show in the bit viewer, which is very error-prone and not much fun at all.  So last night I constructed a Python script that does the core PLL calculation, and this morning added code to use the BusPirate to set the clock.  So far it works like a charm!

The code uses an iterative method, but one I’ve already thought through as far as implementation in a microcontroller.  It works back from the target clock, first finding a Pdiv that results in a Fvco closest to the nominal 135MHz.  It then tries all valid Pdiv’s above and below that still fit within the 80-230MHz range.  For each Pdiv/Fvco combination, it tries all the N multipliers from 1 through the max 4095, checking if the multiplied frequency modulo the Fvco results in no remainder, producing a viable M.  From there it calculates the intermediate values required to shove into the PLL registers, and outputs an I2C string to the BusPirate to set the clock.

As useful as the above is, setting the clock speed can sometimes be something you want to do at run-time.  Or more likely, you just don’t want to have to go through all that trouble when prototyping requires you to change the clock.  To solve that problem, I also designed a board that includes a microcontroller:

Populating this board is lower priority, but it’ll happen sometime soon.  The Xmega32A4 on the right is intended to run a microcontroller version of the above algorithm, with some tweaks in place for performance.  Mostly that means trying to fit the calculation into common bit widths, and dealing with the cases where it can’t gracefully and efficiently.  The goal is to have a register set on the MCU accessible via the various available protocols (the upper row of the board is a straight copy of a “serial” port on the Xmega, providing hardware async serial, I2C, and SPI) that lets you simply say “I want xx.yyyMHz on pin X, go!” and get a clock out.  Things get a little bit more complicated when you ask it to deliver two different clocks on pins that share a PLL, but that’s only a matter of finding a common Fvco with which two Pdiv’s generate the requested clocks.

A more interesting feature of the code destined for the MCU is the ability to lock the crystal to an external pulse.  To do so you would designate one of the interface pins as a trigger, and configure it for a particular mode.  To start off, the MCU will switch its clock from the internal oscillator to one of the PLL’s outputs, thus creating a cycle counter based on the crystal.  When these pulses are detected on the pin, the MCU will compute the difference between the actual counter and the desired counter, and run a PID to generate the VCXO control voltage, thereby dragging the crystal back into alignment with the external source.

The trigger modes would be pulse-before-count, pulse-after-count, and pulse-per-X.   In the first, the controlling circuit is expected to provide a trigger pulse, and then set a register with the cycle count that it was supposed to be located at.  In the second, you would set the register before the trigger pulse.  In the last, you set the number of cycles that are supposed to occur between pulses that come at regular intervals.  This mode is ideal for interfacing with the 1PPS signal coming off a GPS receiver.  Run the MCU off Y1 at the base 24.576MHz frequency, set the register to 24,576,000, connect 1PPS to the right pin, and suddenly you have a locked atomic frequency.

I intend to sell both of these modules on my (still upcoming) webshop.  The bare module should probably run about $10, while the Xmega-based module will likely run around  $20-$25.  As usual, if you need one of these and can’t wait for the webshop, let me know and I’ll see what I can do.  Just remember the code for the MCU doesn’t exist just yet.

h1

Time-of-flight measurement

2010/08/28

One of the requirements of the product I’m developing is that I be able to tell the relative distance along a wire of all the nodes in the network.  Because they are sitting on the bus in parallel and are not allowed to cut and internally bridge the wire, I have to use some arcane methods to figure out where they all are.

What I found was a chip from ACAM called the GP2, which is a time-of-flight measurement chip capable of 50 picosecond resolution measurements between start and stop pulses.  Using this, I can tell each node in turn to place a short across the bus (held with power from a cap), and measure how long it takes for a pulse to traverse one half of the wire, the node, and the other half.  By making averaged measurements and sorting the nodes, I can determine their order on the bus.

The first generation board for this included a bunch of jumpers to allow me to reconfigure the various timing-side pins:

It took quite a bit of time to work out how to get the chip to function in the first place, thus the extra resistor and jumper wire around the crystal.  Turns out ACAM put a pretty fragile oscillator on their chips, which requires both a drive-side series resistor (220R) and as well as a parallel resistor (560K) in order to work.  This could be contrasted with a conventional 8-bit microcontroller that generally functions without anything except the crystal at all, but is “cleaner” with load caps.  Sigh.

The jumpers allow me to enable the start and stop inputs, route the fire-pulse generator to start and the line interfaces, gang the two generators together (for 96mA drive current), and configure the “fire-around” mechanism that I don’t entirely understand since I don’t need it…

In an effort to make the design more useful for integration into a protoboard form of the network master, I redesigned it as a 600mil DIP module:

All the same functionality is present, but without all the jumpers.  The 32KHz calibration crystal is missing from this board because Digi-Key had (and still does, my notification to them apparently not having taken effect yet) the ECS-.327-7-38-TR listed as a 4.9×1.8mm crystal, rather than the 7.0×1.5mm it really is…  I have actual 4.9×1.8mm crystals coming on Monday or Tuesday, so I’ll fill that in.  However, since I don’t actually care about absolute accuracy at this point, I really could care less about the calibration clock.  On the bottom is a (unpopulated) site for an MCP1703-3.3 regulator, with pins on the top left for both +5V and +3V3.  All the power and digital I/O is on the top side, while all the measurement-side pins are on the bottom.

Getting the chip actually running was a monumental exercise in frustration, since the datasheet (“registration” required) for the chip is easily the worst-laid-out document of its type I’ve ever run across.  While the designers of the time-of-flight core in the chip were clearly rather talented, whoever did the SPI and registers front-end needs to be shot. Repeatedly.  That being said, I plan on writing up a better organized and more coherent “quick start” along with default registers for the module…  I’ll probably even publish (as-is) the Python GUI I created to tweak all the registers more easily, which operates via BusPirate.

The first board pictured is about to be shipped to a guy in Brazil who managed to find my un-set-up webshop with it listed.  At some point soon I need to try rebuilding the shop with a different backend and actually get it up and running fully, at which point I’ll be offering the DIP module for sale.  Lead time on the module will be somewhat long though, since the one pictured above has the last of the 3 chips I purchased at ~$32 each.  If anybody wants one, I’ll have to order more chips first.  I have 2 unpopulated boards in my possession at the moment, so if you’re interested in one, speak up ;-)

h1

Desktop disaster of the day

2010/08/27

Here’s a shot of my desk from yesterday:



The red boards on the right are SparkFun FT232RL adapters.  Bottom right is a Teensy++.  The two long boards are my ATxmega256A3 adapter boards.  The red and blue square boards are SparkFun nrf24l01+ radio boards.  Hanging mid-air is my ATxmega32A4 + nrf24l01+ board, with its debug lines soldered to jumpers that hold it midair.  Below the protoboard is a nrf24l01+ board designed to mount to a Teensy, for USB bridging.  Just above the USB key on the left is an edge view of SparkFun’s nrf24LU1 board that’s intended to supercede the Teensy-based unit. The little round board at the bottom is a compass-based servo board for a borehole geophone.  To the left above the red Sharpie is the latest version of my ACAM GP2 development board, used for ~50ps resolution time-of-flight measurements.  Its predecessor is the square board just above the protoboard.  On the extreme left edge you can see the round 2-board stackup of the 3rd revision of my main project, and the little Bluetooth debug adapter just below that.  Misc cables, programmers, hubs, tools, etc. are scattered everywhere else.

And that’s just that part of my desk.  The next 3 or 4 feet left contains my soldering environment, with iron and toaster, hand tools, and piles of parts everywhere…..
h1

Dual DMX board populated

2010/06/02

I just finished putting the remaining parts on the dual DMX Xmega prototype board, and it comes up at least as far as getting the programmer to talk to the chip.  The next step is to bootstrap it up and get some rudimentary DMX transmission code going, and hack one of my DMX cables so I can connect it to the two terminal strips, one each for input and output.  I’ll probably just make a basic all-channel fader test, and hook up both the 1200W dimmer pack from church and my 8-fixture LED kit (24 each red, green, blue, and white per fixture, total 60W for all; I really should post further details on that old kit and how it relates to my newer projects…).

h1

“Rev 1″ Xmega adapter art

2010/05/15

I’d mentioned a post or so back that I found assembly costs to suffer from the use of QFN chips, and that I was going to redesign the Xmega adapters to use PQFP instead.  Here they are:

I call these the “rev1″ boards because the first round of QFN’s were the real functional test.  These boards have identical schematics, just different parts implementing it.  The pins are now surface-mount on the bottom of the board, which doesn’t even come close to offsetting the costs of the QFN when it comes to assembly (quoted at Screaming Circuits).  I’ve also switched the A3 boards back to 0603 caps, since while I can do 0402′s by hand (the first rev0 A3 board is assembled and working as well!), I don’t think they’re going to scale well for production.  They spend half their time stuck to the tools instead of the board…

I’m going to turn a set of 3 of each of these with the next group order to make sure I can do the bottom-side headers, then these will be the “final product” boards until something else needs to change…

h1

Xmega board up and running!

2010/05/11

This morning I soldered up the first of the A4 boards, and it works great so far!  I’m working on thorough “boundary scan” testing in the form of hooking up LEDs to each of the pins and making sure the chip soldered properly, and if that passes I have a perfectly functional board.

For those who got boards and parts kits last night at DorkbotPDX, here are ZIP files of the final Eagle and Gerber files the boards were made from:

One thing I forgot to mention to everybody is that the crystal has to be connected via a pair of solder jumpers right up against it.  The soldermask is supposed to be missing from between them, and the gerbers show that it’s supposed to be, but the boards look like they have some in there anyway.  What it boils down to is that you need to make sure you glob plenty of solder in there, either paste or after the fact.

After some research into the costs associated with making these in quantity, I came to the conclusion that a redesign was in order, to use the PQFP parts instead of QFN.  The resulting boards are a hair wider, and use surface-mount headers on the bottom, but are schematically identical to this first batch of boards.  The A3 version might actually end up being a 900mil board though, since the PQFP-64 isn’t liable to fit on even the wider 600mil board…  The resulting boards will end up my upcoming webshop, hopefully within a few weeks.

h1

Webshop coming soon!

2010/05/06

I’ve started setting up an osCommerce installation on my colo machine, and am trying to both get my bearings within the software package and get a shop set up with some kind of sanity.  The only products listed so far are the ATxmega bare and assembled boards, and an under-development DMX-512 variant.  The shop will end up listing a lot of under-development items, as that’s how I intend to gauge relative interest in my many and varied projects.  Pre-sales and people expressing strong interest via a poll of some sort will tell me which projects I need to focus on first.

Given Sparkfun’s recent posting about the number of such electronics webshops that are doing more than $1million yearly revenue, I’m hoping that I can offer products that fill needs that haven’t already been met elsewhere, and end up with a nice revenue stream to boot ;-)

The webshop will be formally opened once I can get a few more projects listed, and get the whole front-page/logo/layout thing at least partly under control.  I’m hoping for no more than a week from now, since I’ll have not only bare PCBs but assembled modules IN STOCK and ready to sell in about the same timeframe.

Follow

Get every new post delivered to your Inbox.