My Home Gig...
12/22/17 - I work at Superior Music / The Amp Doctor part time,
usually 2 or 3 days a week for a few hours during the day, I love tubes
and amps and pedals but my main bread and butter gig is designing
surface-mount electronics for noise-cancelling headsets and other
communications devices. In some ways I create workers for me - once a
design is done then so long as the factory keeps stamping the stuff out
and the customers are happy then it's almost like free money. But not
quite... when something messes up it can get very hairy fast. I have to
make sure the parts we are using perform to spec and if any doubt make
sure we have alternatives. Active Noise Reduction (ANR) is tricky stuff
- have to put a mic right next to a speaker, crank the gain and select
component values so that it doesn't feed back under any conditions.
Things out of our direct control like a company changing the way they
make the speakers can really mess us up (and did) so now they test
every speaker first using a custom tester I made. And it has to be
fast! Adding too much time for testing increases costs but has to be
balanced against the much greater cost of reworking product.
When not protecting our current production, I'm often designing new
stuff... right now I'm working on an intercom system for racing
applications, has to do crazy stuff like muting 115db of background
noise but as soon as the user starts talking activate the output and
clean up the signal as much as possible so other users can understand
what's being said despite the noise. Besides the usual opamps and
analog stuff, had to use a programmable audio processor chip along with
a small microcontroller and eeprom to load the DSP code into it.
Getting that stuff to work was a nightmare! Plowing through hundreds of
pages of datasheets and app notes that forget to mention the one little
detail needed to actually make it work. Then there's the matter of
hand-soldering a 32 pin 5mm square chip that doesn't even have pins.
The general process starts with a customer telling us what they
want, sometimes what they want is not practical so there's some back
and forth until it looks doable, then a detailed spec is drafted. Then
sometimes they change their mind about something as details have a
tendency of bringing out more details once they think about it. Once
all that settles down it's time to actually start designing the thing.
If it requires non-stock plastic pieces others take care of that and I
end up with 3D models and step files and stuff to know exactly what
shape board I need. If I'm not sure what the PCB size will be, I design
the board first (at least a rough) then they make the case based on
that.. I can export a board as a 3D model they can plop into their 3D
design to make sure it fits properly. For some projects (such as the
intercom I'm working on now) I can use a stock case and design the
boards to fit that.
With specs in hand now I can create the circuitry. Electronic design
is mostly putting together a whole bunch of simpler circuits and
connecting them to accomplish whatever it is it has to do. Individual
circuit blocks are often reused, once I know something works then I'll
just tweak it for the app and don't have to worry too much about
testing. For new circuits I usually test the idea in LTspice, a circuit
simulator. Spice doesn't prove it will work and not everything can be
simulated, but anything iffy that can be simulated has to work in the
simulator first before committing to foil. Often stupid design flaws
and things I didn't think about get uncovered by this step. If I'm
still not confident in the design I'll make a perfboard or breadboard
prototype using surfboard adapters for the SMT chips to verify proper
operation before proceeding.
Once confident in the design it's time to fire up Altium Designer
and go deep.. Windows sometimes crashes when stressed so I run Win7 and
Altium under VirtualBox and frequently save my work back to Linux and
run backups to save the work and the virtual disk file.. not exactly a
supported configuration so I'm still using AD10 and save megabucks by
supporting myself. Works for me and I don't need the new features of
later versions. Ironically without DirectX and fancy graphics Altium is
much more stable, at first I ran it on a dedicated Windows box but it
crashed all the time (likely video driver issues) and the last time it
crashed took out the OS and everything - can't have that! First step is
to make a new project folder, copy over the component libraries and PCB
rules and create a new PCB project. For any component that's not in my
custom or stock libraries I have to make a symbol and a footprint for
it, that's tedious. Once that's done I can enter a schematic into the
schematic editor. Once that's done I can go to the PCB editor, define
my PCB layers and shape and import the rules and the netlist, ending up
with a big line of parts all with huge designators on the silk layer.
After much mindless clicking to shrink designators and move them to a
mechanical layer I can actually start placing parts and see if all the
stuff will actually fit within my size constraints. Once everything is
placed then it's time to route. For simple boards I manually route but
for complicated stuff I use the autorouter - and watch it make a mess
or fail to complete. Rip it up, shift stuff around, try again,
eventually it completes other than self-inflicted contentions. At this
point it's still a mess - unnecessary vias, multiple traces connecting
the same thing, inappropriate paths, but for a complex board it's
faster to fix the mess than manually route the whole thing. Once it's
all cleaned up and passes design rule checks then I can generate
Manufacturing the PCB itself requires Gerber and drill files (I
usually provide the drill file in both NC and ascii text format. My
designs tend to be quite dense, no room for component designations on
the silk overlay so I use mechanical Gerber layers along with other
layers to generate the placement chart, for this and also to check the
files I use GerbView under Linux, can export to PDF or I can just
screendump and crop it. The PDF export is very handy because it prints
actual size letting me verify the pads by placing actual parts on the
printed copy. Usually during the check phase I'll find something that's
off or could be better, so back to Altium to fix it. Once satisfied I
zip up the files needed to make the PCB's along with a readme file
(which often doesn't get read but gives me an out) then send it to a
PCB manufacturer... Myro Seeed etc. While waiting for boards I prepare
the parts list and order everything I need to hand-build a few
prototypes for testing. Once everything gets here I dump all the parts
in the floor and get busy with a soldering iron and tweezers. For stuff
with QFN parts like that audio processor I solder that first with
paste, a hot plate and hot air.. the low-temp paste makes it fairly
easy to remove and redo if it doesn't work. Most of the parts are 0402
resistors, 0603 capacitors, and transistors diodes opamps and other
chips in various packages. For the resistors and capacitors I put
solder on one pad, place the part then solder the other pad, melting
the first pad again to make sure it's really on there. For the
fine-pitch chips I solder one pin and make sure it's aligned and flat,
glob solder on both sides then remove the extra solder with solderwick.
Scary but works fine. Usually the circuit works fine but not always..
when it doesn't it's usually because I failed to fully inspect the
design and a mistake slipped through, in which case time for a beer,
get over it and try again. Sometimes there are unexpected bugs like
chopped switching regulators causing audible noise.. stuff like that
tends to only happen once.
Now that the proto works and is approved by the customer, time to
manufacture. SMT PCB's are assembled by screening solder paste onto the
pads, placing the parts with a pick and place machine, running the
boards through an oven to melt the solder, depaneling (each panel
consists of many boards with routes and breakaways between them so they
have to be separated) and testing. Some manufacturers use a flying
probe to test each board while still on the panel, but not always and
such tests don't pick up everything, so highly recommended that a
custom "bed of nails" tester be constructed to exercise the finished
board and make sure responses, voltages, supply current etc are within
spec. Typically 1%-4% of the boards fail testing, usually from solder
that doesn't stick. Sometimes none of the boards work - some part
backwards or the wrong value. Once had a reel labeled 82 ohms but the
resistors were actually 82K. I do my best to make sure all the files
are perfect so when things like that happen it's on them and not me.
To assemble the boards, in addition to the regular PCB Gerbers they
also need a Gerber with the paste layer to make the stencil, and a
Centroid file that specifies the X/Y centers and rotation of every
component on the board. The specifics of the Centroid file vary from
one company to another so check. Also definitions regarding rotations
do vary, and that's scary! Best to include a readme that exactly spells
out the rotation standards in the Centroid, make sure part polarities
and pin 1 are clearly marked on the silk overlay, and request that they
manually verify rotations before running the boards. Usually they do
because they don't like wasting parts and time, but if you don't spell
everything out then they can say you got the file wrong (plus the
rotation standards are all over the map so good chance the file is
wrong). Also the board design needs at least 3 fiducial marks - small
of exposed copper - so the pick and place machine can calibrate itself.
Altium Designer outputs a "Pick Place" file that includes the board
offset (since there can't be anything under zero the design starts with
some X/Y offset), the wrong rotations and more info (like component
values) than is needed. Some companies might be able to use that but
the ones I deal with want designation, x center, y center, rotation and
top/bottom with no offset. To get it into that format I wrote a program
in FreeBasic that prompts for the board offset, reads the Altium Pick
Place csv file, fixes all the stuff and outputs a csv file in the
format I need.. seems to work for Myro for small-run stuff and for the
American companies we use for our main products.
Some more tips... Try to
have as few unique parts and values as practical -
pick and place machines have only so many reel slots and if the design
uses them all up the factory has to make multiple passes and they
charge more for that. Keep the number of unique drill sizes to a
minimum, and minimize the total number of holes. That said, remember
that every via to ground (or trace for that matter) is a tiny resistor
so avoid grounding a sensitive part to the same via as say a filter or
digital bypass cap. Although 2-layer boards are cheaper, 4-layer boards
with dedicated ground and power planes don't cost that much more and
work much better.. every time a trace passes over a break in the ground
plane the return current (especially at high frequencies) has to find a
way around the break. App notes often recommend using split ground
planes to separate digital and analog circuitry, in my experience a
single unbroken ground plane is usually better - the real rules are to
minimize noise pickup signal traces need an unbroken ground path
parallel to the trace back to the signal source, same thing for digital
traces to minimize emissions, and digital things need their varying
power needs coming from bypass capacitors to minimize noise injected
into the ground plane. If a power plane is used for both analog and
digital stuff, consider using a single via to feed the digital stuff
through a low-value resistor (typically 1 ohm) and run separate power
traces to all the digital bypass caps and devices, that keeps digital
noise out of the power plane so it won't radiate into the analog stuff.
So long as digital ground return currents don't cross over into the
analog areas there's no need to use a split ground plane. That said,
just about all my designs that use digital stuff tends to be low
current, not that high of a clock rate (microcontrollers etc), and more
analog than digital - high-current high-frequency digital stuff is a
different beast and some of these tips probably don't apply, some
sensitive designs might require a split plane to keep the noise out of
the analog circuitry. The main thing to realize is the higher the
frequency, the more the return current will try to find a path parallel
to the signal.
Inches vs Millimeters
I usually (but not always) design PCB's using inch measurements for the following reasons...
It's what I'm used to and it's what my customers are used to.
Manufacturers don't care - the measurement system is part of the file specs.
I use many components that are based on 0.1" centers. Inch grids make them easier to place.
It's easier to pick 7 mil, 10 mil etc track size than fractional millimeters. Same with hole sizes.
It's trivially easy to convert from one to another, I use a simple BASIC program for that.
It's trivially easy to switch from one to another in Altium, for metric parts I use a metric grid.
Seems like every week I read someone dogging someone else for using
inches (especially on Hackaday) and I don't really get it, and I have
to wonder how much real design work those who complain really do. If
they did seems like they'd realize that what they think someone else
should do has no effect on the reality of someone else's situation...
the choice to use inches or millimeters depends on what kind of parts
they use and what the customer or fabricator prefers. Usually it's just
the parts that determine it - if I'm designing a board that's full of
0.1" headers then I use inches. If I'm making footprints for metric
parts I use millimeters.. it's not either/or.
Terry Newton (firstname.lastname@example.org)