"Explain Like I'm 5": Printed Circuit Boards December 01, 2016 13:23
What is a printed circuit board (PCB)?
Before I answer that, let's talk about how circuits were made without PCBs. Before the advent of PCBs, people soldered components and wires right to each other, usually with the help of some sort of rigid board. For example, the technique shown below is called "turret board," where wires and parts are soldered to each other and to turrets to complete a circuit.
As you can see, assembling electronics used to take a lot of time, skill, and focus! Then PCBs came a long and made everything a easier by building all those wires right into the board itself.
PCBs are rigid boards with pre-wired circuitry, plus some extra perks like soldermask and silk-screening (more on those to come). So these days, instead of painstakingly cutting, bending, and soldering each connection, the assembler just has to solder each component in the right place and the PCB does the rest.
What are PCBs made of?
PCBs are made of several layers, like an onion parfait. These layers are: substrate, copper, soldermask, and silk screening. PCBs can have several of each of these layers, but most audio PCBs are "two-layer" boards (top and bottom) with this makeup:
Let's take a look at a very simple PCB, our L2A Passive Re-amplifier, layer-by-layer. To keep things simple, we'll only show the top copper, soldermask, and silk-screen layers.
The core of a PCB is fiberglass. Its job is to be rigid (to hold the parts in place) and non-conductive (so electricity won't pass from one side of the PCB to the other). The holes you see in the substrate are for mounting components to the PCB.
This is where the circuit happens. The copper circles you see are called "pads"; this is where the parts get soldered to the board. The lines are called "traces"; this is what carries the electricity from one part to another. There are only a couple of traces visible here because most of them are on the bottom side of this particular PCB.
Although the pads and traces are made of the same thing, we only want to solder to the pads. So we cover the traces in a layer of polymer called "soldermask" that keeps us from getting solder on the traces.
Finally, we print some silk-screened labeling so that the humans can know where to put the parts.
Can I make my own PCBs?
Yes! Start by learning your way around an ECAD (electrical CAD) program. The most popular free programs are EAGLE, DipTrace, Upverter, and KiCad. My favorite of the bunch is Diptrace, though EAGLE is somewhat of an industry standard among DIYers. Here's what the L2A board looks like in DipTrace:
The best beginners' guide I've found to PCB layout is Dave Jone's PCB Design Tutorial (PDF).
Once you've got a layout, you can either order your PCB from a manufacturer, or etch your own at home.
OSHPark is an amazing, game-changing service that charges only $5 per square inch for three copies of your PCB. Unless you plan to make lots of PCBs at home, you won't beat that price rolling your own, and you certainly won't approach the same quality.
If you just love the idea of making your own PCBs or can't wait for OSHPark to deliver, Make Magazine has a great rundown of all the ways you can roll your own.
Any other questions about PCBs you like me to answer?
Let me know in the comments!
"Explain Like I'm 5": Opamps July 21, 2015 14:09
What are opamps?
Opamps (or op-amps, or operational amplifiers) are small, inexpensive integrated circuits that can be used to do a ton of different things in audio electronics. They can apply gain or attenuate a signal, create filters, present desired input/output impedances, oscillate at specific frequencies, etc.
They’re usually manufactured on a black, spider-like component with at least five terminals:
What do opamps want?
Instead of talking about how opamps work from an electronics perspective, it’s easier to think about what they want. Opamps want their inputs to be equal all the time. So if the voltage at both inputs is 0, the opamp is happy–it doesn’t need to do anything at all. But the second we change the voltage at one of its inputs, the opamp will jump into action immediately to give the other input that same voltage. Absolute equality–that’s all it wants.
Opamps are so committed to this single desire that they will burn themselves out in a plume of noxious smoke before admitting defeat.
How do they get what they want?
Opamps use their outputs to make their inputs equal. But they can’t do this on their own–they need us to provide a feedback path. Let’s say we kindly oblige and solder a wire between the output and - input pins. (This is called negative feedback.) Now whatever voltage the opamp sends to it’s output gets immediately sent to the - input as well. In other words, if the + input is fed a certain voltage, the opamp can immediately make the - input the same by adjusting its output voltage. In other words, it can get what it wants!
Now let’s do that with numbers so you can see what it looks like. Say we connect a microphone with a 1V output to the opamp’s + input. The opamp wants to make - input 1V as well so it sets its output to 1V. And since we’ve attached a negative feedback wire, that 1V is immediately sent to the - input. Now both inputs are sitting at 1V and the opamp is happy.
How we make them do what we want?
That’s all well and good, but if we stopped there the opamp would only be good for passing unity gain. The real fun comes in replacing that feedback wire with some more interesting components. Let’s say we replace it with two resistors configured as a voltage divider.
A voltage divider in the negative feedback loop
These resistors will take the voltage from the output and cut it in half before it reaches the - input. Let’s go back to our example from the previous section. If the output were still set to 1V, the - input would be at only 0.5V. And that’s not what the opamp wants! So now it adjusts its output to 2V to get 1V back to the - input. The opamp is happy again and our microphone signal is 2x (6dB) louder at the output of the opamp.
And gain is just the beginning. We can put all sorts of stuff in the feedback loop: capacitors and inductors for filters, diodes for clipping, transistors for variable gain–you can even put other opamps in there! The point is that the opamp just wants one simple thing–to make the inputs equal–and we can make it do all sorts of stuff just by making it work harder to make that happen.
How do opamps work?
I honestly have no idea. I’ve never designed one or even bothered to look at one’s schematic diagram. But that’s the beauty of integrated circuits: you can treat them like a black box. If you understand their specs and theory of operation, you can use them without knowing what’s going on inside.
Why are there so many kinds of opamps?
All of design is basically managing tradeoffs: more gain vs. more noise, greater bandwidth vs. less stability, greater precision vs. higher cost, etc. There are hundreds of different opamps and they all do the same thing but make different tradeoffs. So one opamp may be ultra-low noise, but have stability issues at high gains. Another may be very low cost but have lots of noise. And so on.
What are discrete opamps?
99% of opamps you’ll come across are monolithic, as opposed to discrete. They look like the spider thing below and are manufactured in massive quantities on silicon chips.
A standard monolithic opamp IC
But some folks in the audio community are not content to pick from the variety of monolithic opamps available. They prefer to roll their own by placing individual components on a printed circuit board. They are big and expensive and usually sport “worse” specs than even low-end monolithics, but they have certain benefits like being proprietary and high-margin entirely customizable to suit the designer’s ears.
Do different opamps sound different?
There's much debate over how significant the audible differences are between different opamps. Some people (often musicians) claim to hear a "night and day" difference when they swap the opamps in an old piece of gear. Some people (often engineers) claim there's no difference at all.
I've spent a good bit of time listening to different opamps in a controlled environment and my take is that audible differences between opamps are vanishingly small when they're operated in their linear range. When you start to ask them to do stuff beyond what on their spec sheets, all bets are off.
So, swapping an opamp that's just a buffer between two stages in a compressor? Probably not gonna hear much of a difference. Swapping opamps in a circuit with a hot input signal and excessive amounts of gain? You will hear major differences, akin to using two different mic preamps to apply a lot of gain.
Did I miss anything?
I hope that helped clarify things a bit! Is anything unclear? Let me know in the comments if you have any other questions about opamps I can answer.