Close

Drawing first smoke

A project log for Amply - A $10 desktop BT amplifier you'll love

Building a great sounding amplifier for your desk on the cheap

marco-tabiniMarco Tabini 6 days ago0 Comments

In the Design Walkthrough, I mentioned that the R15 resistor on the output stage of the amplifier was a compromise between the needs of the circuit and the available board space. Good design practice would have been to use two separate resistors, one for each branch of the push-pull output stage, but I wanted to fit everything on a 100×100 mm PCB to stay within the size for which most PCB manufacturers charge a flat promotional rate.

In this update, I wanted to dig a bit more into this particular part of the circuit and show you that, even though a 0.33 Ω resistor may seem like an insignificant component, it is actually a critical part of the design.

Transistors are weird, man

Transistors are inherently “unique” devices: even if you pick two transistors of the same type, and even if they come from the same batch, they will have different characteristics—sometimes wildly so. This is because of the way they are manufactured: they are made by doping silicon with impurities, and the exact amount and distribution of these impurities can vary from one transistor to another.

To add to the problem, the characteristics of a specific transistor also change based on the operating conditions. For example, the gain of a transistor (the ratio of the output current to the input current) can vary with temperature, and it can also vary with the amount of current flowing through the transistor. Left unchecked, this not only makes it difficult to design a circuit that works reliably, but it can also lead to a phenomenon called “thermal runaway,” where the transistor gets hotter, thus increasing its gain, which in turn causes it to draw more current, which makes it even hotter, and so on until the transistor is destroyed.

Thus, the golden rule of transistor circuit design is that the reliability of the circuit does not depend on the characteristics of the transistors; instead, the passive components around them are designed to ensure that the circuit operates within a specific envelope, is stable, and so forth.

Degenerates live in your circuit!

One of the most common ways to ensure that a transistor operates within a specific envelope is to use a technique called “degeneration.” This involves adding a resistor in series with the emitter (for a BJT transistor) or the source (for a MOSFET) of the transistor. (The term “degeneration” comes from early vacuum tube and transistor amplifier theory, where it referred to a mechanism that degrades or reduces the gain of an amplifying device through feedback.)

The resistor creates a voltage drop that is proportional to the current flowing through the transistor. This means that if the current increases, the voltage drop across the resistor also increases, which in turn reduces the voltage across the transistor and thus reduces its effective gain. This negative feedback mechanism helps to stabilize the operating point of the transistor and makes it less sensitive to variations in its characteristics. Obviously, the resistor also limits the maximum current that can flow through the output stage and dissipates power of its own, so you typically choose a small value: large enough to prevent thermal runaway, but small enough not to waste too much power or reduce the efficiency of your circuit.

(Note that this is not the same kind of “negative feedback” that is commonly used in amplifier design, where a portion of the output signal is fed back to the input to reduce distortion and improve linearity. Degeneration is a form of local negative feedback that is applied directly to the transistor itself, rather than to the overall amplifier circuit.)

In general, you want each branch of the push-pull stage to have its own degeneration resistor so that each output transistor can be stabilized independently. In our case, R15 is therefore not a true degeneration resistor; instead, its role is primarily to provide a small amount of current limitation to the output stage, preventing thermal runaway through the simple mechanism of limiting the maximum current that can flow through the output transistors. This is not ideal, but it still works.

How bad of a compromise is it?

The next obvious question is: how bad of a compromise is it to use a single resistor for both branches of the push-pull stage? Can we just do away with R15 altogether and save even more board space?

This is not the kind of question that can be answered with a simulation, because there really is no practical way to simulate the thermal behavior of the circuit accurately without expensive tooling. Thus, the only way to put this to the test is to build the amplifier and see how it performs in the real world.

…which is exactly what I did! I built a version of the amplifier without R15, and the results were thoroughly underwhelming: the amplifier worked perfectly fine, without any distortion that I was able to detect and with no explosions or fire (always a good thing).

However, the nature of this problem is that it is not deterministic: one amplifier may work perfectly fine if the transistors happen to have characteristics that are well matched, while another amplifier may fail spectacularly if the transistors happen to have characteristics that are not well matched. In other words, the fact that one amplifier works without R15 does not mean that all amplifiers will work without R15.

…and so, of course, I decided to build another prototype to see if I could get a different result. This time, the amplifier did not work at all: the output was very distorted even at low volumes, and the transistors got very hot very quickly. I was not quick enough to turn off the power, and the entire output stage was destroyed in a literal puff of smoke, taking the USB-C power supply with it.

Therefore, R15 is here to stay; in fact, I suspect that I will bring back the second degeneration resistor in the next revision of the board. I will have to find a way to fit it in, but I think it is worth the effort to ensure that the amplifier is reliable and can be built with a wide range of transistors without any issues.

Despite the awful smell of magic smoke, I am actually glad that this happened, because it is a great example of why it is important to follow good design practices and not take shortcuts, even if they seem like they will work in theory. It also shows that sometimes, the only way to really understand how a circuit works is to build it and see what happens in practice.

Discussions