Design mistakes in synth schematics

Tags: electronicsdesign

There are a lot of bad synthesizer schematics on the Web, and it doesn't hurt their popularity. As a designer who tries to get everything right, it's somewhat disheartening to see designs with obvious, simple flaws get built commercially and cited as positive examples - and it's even worse when someone has trouble with one of my modules because they tried to connect it to the latest popular whiz-bang box which has bad levels or whatever and does not play nicely with others. In this article I'm going to talk about some of the problems I see time and time again both in free schematics published for DIY hobbyists, and in commercial modules.

I don't want to make more enemies in this business than I already have, and I'm not going to name who's making these mistakes nor the products where they can be seen. For that reason I've drawn up a schematic of my own illustrating the issues, and I won't give specific examples of where I first found them. But every one is visible in at least one published schematic I've looked at recently; most are in commercial products; many are in more than one; and some are in very popular products.

Some of the points I'll talk about are responsible for repeated threads on modular synth forums: "Why am I having this problem with such-and-such popular module?" "Because it has this design flaw." But the manufacturer doesn't fix it, and people keep buying the product and having the problem. I guess it's a matter of "buyer beware."

If a circuit just plain doesn't work, then people aren't going to be able to sell it, and its schematic is unlikely to be passed around by SDIY hobbyists. So a problem that completely prevents a circuit from operating won't be seen in a popular schematic and won't make it onto my list. But there are many ways to build a circuit so that it will work within a narrower range of operation, or superficially appear to work when first tested, while still being flawed in an important way. That's the kind of mistake I want to cover here.

The hostile world

People plug all kinds of crazy shit into their synthesizers and the modules had better be able to take it without suffering damage and preferably also without causing damage to the other equipment. In particular, a module intended to process a signal at let's say plus or minus 5V - a typical level for a strong audio signal in Eurorack - may well see voltages outside that range on its inputs sometimes. It may also have out-of-range voltages, or in-range voltages at very low impedance (that is, short circuits) randomly connected to its outputs. My usual guideline is that I want every connection on one of my designs, whether input or output, to withstand an indefinite-duration short circuit into any voltage between the power rails (plus or minus 12V). That's more cautious than many designs I see in the wild, but I know there are people who call themselves pros who would say my rule is not even cautious enough and additional protection is needed. Let's look at how the "shorts to power rails" rule gets broken in some published schematics.

Here's a circuit commonly seen on modules that have trigger or gate inputs.

schematic of a transistor base not protected from reverse voltage

The transistor's base mustn't go much above 0.7V, because it functions as a diode to ground and a higher voltage would create very high current, probably killing it. So the designer has added a 100k resistor to limit the current. Fine. The transistor collector will never go above 5V, either, and that could be useful if it's feeding something like a microprocessor that can only accept 5V input. If you feed a logic level that bounces between 0V and 12V into this transistor circuit, the microprocessor downstream of it will only see 0V and 5V and this circuit functions to get the signal into the micro safely. (It inverts the signal, but the software on the micro can be written to take that into account.)

The problem is, what happens on a negative input voltage? Then the transistor's base-emitter junction is reverse-biased. For small negative voltages, no problem, it just won't conduct. But the absolute maximum reverse voltage rating for a 2N3904 transistor is 6.0V (even less for some other common transistors). Apply more than that much negative input and it will go into Zener or avalanche breakdown, passing current in the reverse direction. The current will be kept small by the 100k series resistance, but the transistor isn't designed for it and may be permanently damaged. This input cannot safely accept a voltage below -6V. A quick fix would be to add a basic switching diode, like a 1N4148, from ground to the transistor base, to pass any reverse current and prevent the transistor's base-emitter junction from seeing a larger negative voltage.

It's entirely possible that the designer who made this mistake copied the circuit from something like a guitar pedal with a single-sided power supply (like 0V and 9V instead of -12V and +12V); there, a negative input voltage would be less likely to be seen on the input and maybe that would be an excuse for not guarding against it in the original. One of the common themes we'll see in this article is that circuits which are okay in one context may become bad if thoughtlessly imitated in a different context.

Here are a few more examples of similar issues.

op amp input exposed to the world

The TL074 op amp doesn't work properly if given input below four volts from the negative power supply, which in this case means -8V. If someone plugs such a voltage into the jack socket, the op amp is likely to go into phase reversal or inversion, with its output suddenly switching to a strong positive instead of negative voltage - which is not destructive to the op amp itself, but may cause problems elsewhere and will certainly not be the intended operation of the circuit. It's partly because of this that well-designed synth circuits more often use inverting op amp circuits to receive external input while keeping the op amp's own inputs at or near 0V, where phase reversal will not be an issue.

Also visible in that screen shot is a polarized, electrolytic capacitor, being used in a place where it sees both polarities. For low audio levels that probably won't be a big deal - polarized caps can usually handle a small amount of reverse voltage, especially when it's reasonable-frequency AC instead of steady DC. But a high DC input voltage will appear across the cap in the reverse direction, and probably eventually kill it. This cap should be replaced with some other type, possibly a ceramic or a non-polarized electrolytic.

The positive input of the op amp is exposed directly to the outside signal. That may not be absolutely wrong in absolutely all cases, because TL074s are pretty rugged, but it's a warning sign. It leaves the chip at the mercy of any static charges that come along, and it means that the input impedance of this circuit will be just the input impedance of the TL074, much higher than usually expected for synth modules and likely to cause problems in conjunction with some of the bad output circuits discussed below. Having the op amp input pin directly exposed also means that when the input is connected to an open circuit, such as a patch cable plugged into this module with the other end not plugged into anything, the effective voltage seen by the TL074 may be unpredictable. A resistor to ground would reduce all of these issues; 100k might be standard, but if there were a reason to want an unusually high input impedance, 1M might make sense. Some people would want to put in a series resistor too, though it's important not to depend on only a series resistor because it won't solve the open-circuit problem.

In the schematic I've noted the jack normalling directly to power as a problem, too. Why that's an issue may not be obvious. With no plug inserted, the 5V power line is connected directly to the op amp pin and that's perfectly okay. With a plug inserted, the 5V power line is not connected to anything and that's fine, too. The problem is that for a split second while the user is inserting or removing the plug, the tip of the plug may contact a piece of metal that is, or is connected to, the jack socket normalling contact - so we are likely shorting the 5V power line briefly to whatever is on the other end of that cable. That could damage the other thing; or if the other thing is a short circuit, it could overload the 78L05 regulator. The regulator will protect itself by turning off temporarily. If that 5V regulator is powering something else in the module too, such as a microcontroller, the resulting power bump could reboot the micro or cause other problems. A current-limiting resistor between the normalling contact and the real 5V power line would help avoid this kind of problem.

Here's an analog LED driver circuit that could have come from my LED driver article.

LED current driver liable to apply reverse current

The op amp holds its negative input at 0V. On positive voltage input, current flows through the resistor in proportion to the input voltage and the op amp finds the right voltage to put that much current through the LED. It nicely compensates for the LED's nonlinear response to voltage, and we can easily calculate the maximum current the LED ever has to face - probably about 10mA here because the input comes from another TL074 powered by ±12V, which can put at most about 10mA into a 1k resistance to ground. Many LEDs can safely handle such a current.

The problem is that if the input voltage ever goes negative, the op amp will cheerfully attempt to feed a similar-sized current through the LED in the reverse direction, with as much voltage as the TL074 can muster, likely destroying the LED. There are a few ways to prevent that, the easiest probably being a second diode in the opposite direction across the LED to pass the reverse current non-destructively. The second diode could be like a 1N4148 to only protect the LED, or it could be another LED itself (maybe in a different colour), allowing the circuit to indicate polarity as well as voltage magnitude.

The wrong values and ratings

Sometimes a circuit topology will be reasonable, but the numbers involved create a problem. It could be simply a component value that is wrong, or some calculated number like cutoff frequency that is bad, indirectly because of the component values and ratings. My earlier article on choosing component values may be of interest here.

Here's a typical op amp circuit. The inverting voltage gain is 10, which seems unusually large, but let's assume that was the desired value for whatever reason and look at the other choices the designer made.

components with wrong values and ratings

The impedance at the op amp negative input is 91k (100k in parallel with 1M), and that's probably too high. It's a cliche of Eurorack design to have an inverting op amp with 100k resistors at the module inputs, in order to expose a 100k input impedance to the outside world; and there may not be much way to avoid that. Guitar pedals often aim for an even higher input impedance (1M or more) in order to match the very high output impedance of the physical pickups in a guitar. But these high impedances should be avoided where possible, among other reasons because of an effect called Johnson noise (Bert Johnson, 1887-1970, Bell Labs). In a high-value resistor (or other component with high resistance), the movement of the atoms caused by the simple temperature they are at, creates a noise voltage. That's basic physics and it can't be avoided except by cooling the resistor to cryogenic temperatures. And in very high impedance circuits, this noise voltage may be enough to set the overall noise floor of the circuit. It's usually better to aim for lower component values in op amp circuits in order to bring the level of Johnson noise below that of other noise sources. Analog Devices has an interesting application note on op amp noise (number MT-047), which goes through how to evalute this issue in more detail; as a rough rule of thumb, I usually aim for impedance more like 10k or 20k on any op amp input where I don't need to go higher. Lower is better for noise, but trades off power consumption and loading of the op amp and whatever is supplying the input.

The compensation capacitor needs to be chosen in combination with the other component values; and with the resistors shown here it's probably much too large. From the RC frequency formula f=1/2πRC, the feedback loop's cutoff frequency is going to be about 3.4kHz, and if this circuit is meant to handle audio without deliberately functioning as a low-pass filter, then that's probably too low. If the resistor values are reduced, as might be advisable for other reasons anyway, then it's possible the 47pF compensation capacitor would end up being an appropriate value after all; but it needs to be chosen with the resistor values taken into account. Looking at the schematic it seems quite possible that the designer just copied the 47pF value from another circuit (which maybe had lower resistor values) and didn't understand how it was originally chosen.

The schematic shows a 220 ohm resistor in series with the output, serving to limit current and improve stability. How well will that value work? We can probably assume stability will not be a problem anyway with the feedback loop cutting off at 3.4kHz, but never mind that. Consider the current limiting function. The op amp could in principle attempt to drive its output anywhere between its rails, but let's assume 0V as a default value; at that voltage, the op amp's current output capability will be maximized, and since the input to this op amp is AC-coupled, it's not reasonable for it to hit a large DC voltage anyway.

With the op amp output at 0V, if someone shorts the module output into a plus or minus 12V power supply, then there will be 12V across the 220 ohm resistor and it will pass about 54.5mA. A TL074 is probably able to supply that much, at least for a few minutes. I've seen them source 80mA into a ground short in practice. This much current works out to 654mW of power dissipation in the resistor. Common resistors are traditionally rated for 1/4W or 1/8W (250mW or 125mW respectively); many modern resistors are actually built a little better than the traditional ones and can handle 600mW in the physical size formerly called 1/4W, but 654mW is a little over that rating too, and anyway, at 654mW power dissipation the resistor could heat up enough to possibly damage other things even if it does not destroy itself. The overall picture is that in a sustained short to a power line, this resistor will be heating up too much. It would be better to use one with a little more resistance, to reduce the current; 1k is a common choice. If that much resistance in series with the output causes too much voltage "droop," it may be necessary to switch to a different circuit topology with the current limiting inside the op amp feedback loop, though that may necessitate thinking about a few other issues too.

Overloading an output can happen even without someone mispatching the module. Here's a common mistake I see when someone wants to do hard clipping on a signal.

a Zener clipper that will draw excessive current

The op amp is configured as a noninverting amplifier with a voltage gain of 2. For smallish input voltages the output will be just twice the input; but when the input voltage is outside of about ±3V, the op amp will be trying to drive its output to ±6V or more, and the Zener diodes will conduct and limit the voltage to about ±5.7V (that is one forward and one reverse diode drop for these diodes).

The problem is, there's nothing to limit the current. The op amp will source or sink as much current as it can in its attempts to increase the voltage, and the diodes will draw as much current as necessary to win the fight against the op amp. In practice it might be 10mA or more. This conflict will not actually harm either side, because the op amp has built-in protections and the Zeners can handle a lot of current, but it'll be a waste of power and may have secondary effects like coupling an unnecessary amount of signal into the power lines to interfere with other modules.

I actually designed a circuit very much like this one into the MSK 013 Middle Path VCO recently; but instead of connecting the op amp output directly to the diode clipper, I added a 1k resistor in between (as well as the 1k from the clipper to the output jack). That way, the TL074 and the diodes can both "win" and go to their preferred voltages, with the resistor controlling the current flow. Even 1k may be a little low; I chose that value in order to ensure a significant current through the diodes because I wanted sharp corners on the waveform.

Here's another output impedance problem. There's a popular commercial DIY trigger-generating module that uses a circuit very much like this one.

an output without current sinking capability

In the output "high" state, the transistor is turned off and the output looks like a 10k resistance to +5V, in series with a diode. That's already less than perfect because the effective output impedance is 10k, a fair bit more than the common guideline of 1k, but as long as the user is not trying to drive a "passive" module with this it may not be a big deal. (Passive modules are usually a bad idea, but that's another day's article.) The guideline input impedance of 100k means whatever input this is driving will probably see most of the voltage and be okay. The diode drop takes it down to more like 4.4V instead of 5.0V, and it would be better to supply a full 5.0V for circuits that may want that much on a gate or trigger, but this is still not unreasonable.

The bigger problem is what happens when the output goes into the "low" state. Then, the transistor turns on and takes the anode of the diode to near 0V, probably really more like +0.2V (saturation voltage of the transistor). But this output has no current sinking capability. It goes to a very high impedance state when it is supposed to be "low." Depending on the nature of the input it is connected to, if that input has a positive open-circuit voltage, this output will be unable to bring the input's voltage down near 0V because to do so would imply sinking current through the reverse-biased diode.

I earlier complained about an input that is just directly connected to an op amp pin with maybe a series resistor but no resistor to ground. Such inputs exist out in the real world. If one of those gets connected to this output, then when this output tries to go low, the input will just see its own open-circuit voltage (high all the time, quite possibly) and not the low from the output, and the gate won't get through. This output's states are not really "high" and "low"; more like "high" and "disconnected," and the input may not accept "disconnected" as properly low. People run into this kind of problem in real life, and it shows up as a recurring thread in synthesizer fora, where someone has a module that generates gates and a module that accepts gates, and each of them works with most other modules but they don't work with each other. The two manufacturers try to blame each other for designing a bad input or a bad output. Really, they are both wrong.

The sharp-eyed reader may also ask what happens if someone shorts this output into -12V. Then the diode, and the transistor base-collector junction, will both go forward-biased and pass as much current as whatever is supplying them will allow. The base connects to another input through a 100k resistor not shown in the above clip. The 100k and 10k resistors will limit the current to safe levels for the forward-biased junctions. The emitter-base junction may be a problem. Depending on what, if anything, is connected to the input side of the circuit, pulling the emitter low may have the effect of pulling the base more than 6.0V below ground, at which point the emitter-base junction breaks down. And if we added a diode across it to deal with breakdown on negative input as recommended above, then that protective diode may become a high-current path from 0V to the shorted output. First it burns up, then the transistor is no longer protected and goes into breakdown. A 1k series resistor on the output could prevent that, but would further increase the already-too-high output impedance in the high state.

Now, here's an input where the designer may have been trying to avoid the phase reversal problem by using a voltage divider.

an input with excessively low impedance

The input impedance there will be about 13.6k. As long as it's plugged into an output with low impedance, this probably won't be a problem, but if someone tried to be clever and design a "passive" module, you could be losing most of your signal there.

Using the wrong components

All too often, someone will try to make a design upscale by putting in an expensive part.

a very expensive wideband op amp being wasted on CV

This HA-2520 is a ridiculously expensive part and its main special feature is that it's very fast: 20MHz bandwidth. But in my schematic, it's being used as a CV buffer, where a much cheaper part would be just as good. CV doesn't go any higher than audio and audio doesn't go any higher than 20kHz. Indeed, the very fast op amp may be vulnerable to stability problems that we wouldn't need to think about with a cheaper and more appropriate choice.

Eurorack modules normally use switched mono jack sockets, which have a tip, a sleeve, and a switching contact; but some people call the switching contact the "ring" contact. That term properly refers to the left channel of a stereo jack, and sometimes the mistake makes it into the schematic, with a stereo jack symbol used for what ought to be a switched mono jack socket.

stereo jack misapplied to a mono signal

If it's just a matter of using the wrong schematic symbol, and the pin numbers still work out correctly for the PCB footprint if applicable, then it may not be a big problem. But if someone really builds it the way the schematic says, with what should be the switched signal connected to the ring of a stereo jack socket, then it can be an issue, as whatever is supposed to be connected to the switching contact may end up being shorted to the sleeve.

Using the components wrong

Operational transconductance amplifiers (OTAs) like the LM13700 are interesting and useful components, but using them to best advantage requires some care.

OTA in a suboptimal circuit

In this image you can see the drastic voltage divider on the input, because the OTA chip requires a very low voltage level at the input. There's nothing wrong with that in itself; it's just how the chip is meant to be used. If the input level is too high, the amplifier will have a lot of distortion. But keeping the level low means greater vulerability to noise, offset, and so on. The LM13700 in particular has built-in "linearizing diodes," which if correctly used can allow for a higher input level. Feed some current into the Ibias input, shown as not connected in the diagram above, and you can increase the input level substantially while keeping the distortion low. Most circuits skip this feature, and that's probably part of why OTAs have a bad reputation for nonlinearity.

The OTA doesn't have voltage output but current output. Instead of a low output impedance like a standard op amp, the OTA is meant to have a very high output impedance. The output signal is meant to be a certain amount of current and the output stage should push or pull that current into whatever voltage it is plugged into. But it doesn't do a perfect job of being voltage-independent. In my schematic, the OTA output is connected to a resistor to ground. As the current through the OTA output changes, the voltage at the top of the resistor will change, too. The following op amp stage then picks up the voltage and does things with it.

All this is not terribly bad, but it's not optimal, because having a changing voltage at the output of the OTA is going to change the response of the OTA output stage, and that means distortion again. To really get the best fidelity out of the OTA we ought to be connecting its output to a constant voltage - like the virtual ground of an inverting op amp circuit. Rearranging the following op amp stage would actually save a couple of components anyway, we could undo the resulting inversion by swapping the inputs of the LM13700, and the result would work better.

Nonetheless, there are many circuits including several from the manufacturer's data sheet that connect an OTA output to a resistor or a capacitor or something else that will have a variable voltage. Sometimes it's unavoidable. But in a design like my example, where it would be easy to feed the OTA output into a virtual ground, that's really the thing to do. And some other variable-amplifier chips with current output (like the 2164 VCA) have an even stronger need to connect to a consistent voltage.

In my example mis-design I've left one of the OTA units and both buffer units from the LM13700 chip unused, and that's another thing people sometimes do wrong.

unused chip sections not properly deactivated

Leaving a chip section unused may be the right thing to do sometimes, especially with sections like the buffers in the LM13700 which have a lot of limitations and are often better replaced by op amps. But you have to do it right.

Leaving an input completely unconnected is usually a bad idea. Some people will tell you that disconnected inputs will "pick up noise," and that's baloney, but it is true that they will float to a voltage that may be hard to predict and may cause trouble. For instance, an op amp with its inputs left open may go into a "saturation" state and draw some extra power, or increase the tendency of other units on the same chip to go into phase reversal even if you're not using the output of the unused section.

The right thing to do with a chip section you're not using is connect its inputs to voltages that would be reasonable for those inputs if the section were being used. For an op amp the best thing to do is probably hook it up as a unity buffer buffering 0V: that is, the output connected to the negative input and the positive input to 0V. The positive and negative inputs should not just both go to ground because then it would be amplifying its own input offset, with unpredictable results. For the LM13700 OTA units (much lower gain than a traditional op amp) it's best to connect the positive and negative inputs and the output to ground; the linearizing diodes and control current input can be left unconnected. For the LM13700 buffers, the input should go to 0V and the output can be left open. The general pattern here is that the chip section should be put into something like its normal operating conditions, even if you're not using it to actually do anything. Grounding the output of the OTA is a special case because it is current-based and the current would have nowhere to go without a connection. Other things that produce voltage-based output can usually be left open without trouble.

Power sins

People often have trouble with the basic function of getting power into a circuit. I'm mostly interested in Eurorack modules and this example is typical of Eurorack, but similar issues appear in many other kinds of hobby electronics.

poorly designed Eurorack power filtering

First of all: the Eurorack power connector has six 0V pins and two each for ±12V for an important reason. The wires and connectors have significant resistance and inductance and the multiple wires are supposed to reduce the deleterious effects of those by putting them in parallel. But sometimes people will draw a circuit, and the corresponding PCB, to connect to just one of the multiple wires. Doing that loses the benefit of having the extras, and it may cause some reliability problems. Just consider what would happen if the busboard also connected power to just one of the multiple wires, and the busboard and the module chose different single wires to use. A good design ought to connect all the wires for a given power rail together, at both ends of the cable, and use that joined connection as the power voltage.

Many evils come about because of a desire to filter out "noise" combined with a lack of understanding of how to actually do that. I've drawn a combination of a ferrite bead and a 10 ohm resistor on each power rail, but in fact it's even more common for a designer to provide one spot on the board for the builder's choice of "10 ohm resistor or bead" just as if those two things served the same purpose and were interchangeable. Usually, neither is a good idea.

I've already written about superfluous ferrite beads at some length. The 10 ohm resistors are popularly imagined to serve two functions, both of which are flawed. They are supposed to act as low-pass filters, and they are supposed to burn out if the module draws too much current (for instance, in case of a short or if it's connected backwards), thereby cutting off the flow of current and preventing other things from being damaged.

The low-pass filtering idea is not completely insane; RC low-pass filters are a real thing that can be useful. But the resistor is just an R. You need a C. In order for the resistors to work as part of a filter, they should be combined with capacitors (or even inductors, in principle, to form an RL filter), and the whole thing should be thoughtfully designed to use the proper component values with some analysis of what kind of noise signal the filter is actually trying to attenuate. Just throwing resistance onto the power rails only serves to prevent the power supply regulator from doing its job, to increase internal fluctuations in the power voltage - increasing the tendency of different sections of the same module to interfere with each other. It throws away some of the benefits people chase by trying to use fancy bus boards and cabling that keep the power impedance as low as possible.

The idea of a resistor burning out on overload to protect the module is not completely insane either. After all, that's what a fuse is for, and fuses are usually thought to be a good thing. But you don't reliably know how much time or current it will take to burn out a resistor, and it may not burn out cleanly without damage to the rest of the module. Resistors are not really designed for that. It would be better to use a real fuse, designed for the purpose of protecting circuits and with predictable characteristics. One could even specify a "polyfuse," which is not really a fuse at all but that's what they're called. Unlike a real fuse, the polyfuse is reusable and will reset itself once it cools down.

Power shorts inside the module are only really an issue when you first build it, and the best way to protect against them is to test the module for shorts before plugging it into power the first time. The main reason for using a fuse or fuse substitute on a module power input is not for that one-time case but to protect the module throughout its lifespan against the common Eurorack problem of reversed power voltages. A typical semiconductor circuit usually has the equivalent of many PN junctions between the power rails that would be reverse-biased in normal operation. Reverse the power and those junctions become forward-biased and the circuit will try to draw a huge current, probably destroying itself. So the reverse connection means a lot of current coming through the power inlet and that's why people want to put fuses there, to cut the power when the current goes too high. It sort of works. The fuses, if they are proper fuses, usually do blow and prevent anything else from being destroyed.

But it would probably be better to implement reverse connection protection the way I do: with series diodes on the power rails. In normal operation they drop a small voltage (0.2V for the Schottky rectifiers I like to use), and in the reverse connection case, they are reverse biased and conduct only a tiny leakage current. The module doesn't work that way but nothing gets damaged, and all you have to do to fix it is reconnct the power right way around. Sometimes people gripe about the loss of voltage across the diodes, but it's not significantly worse than the voltage drop across those 10 ohm resistors.

So to summarize, I've gone through a number of design mistakes commonly seen in published schematics. It's not only inexperienced hobbyists who make mistakes; many are evident in the published schematics of popular commercial products. You can look at my sample schematic (PDF file) from which the graphics in this article were taken. And I've tried to offer suggestions for how to do it better in each case, which I hope will be helpful to designers who want to avoid making these mistakes, or to builders who want to improve a flawed free schematic they may have found somewhere on the Net.