3
\$\begingroup\$

As part of furthering my understanding of opamps and audio electronics, I put this headphone amplifier together on a breadboard. Only one channel shown:

enter image description here

The circuit works like a charm, and is based on a number of schematics I scrounged on the web (swapping alternative parts in and out with whatever I had in my junk drawer).

I'd like some help to identify the purpose of some of the passive components, how their values are chosen and why they're necessary. The parts I understand (although correct me if I'm wrong!):

  • The 10uF (C2) and 22nF (C3) capacitors are the IC power decoupling (bypass) capacitors. The 10uF provides a small measure of voltage smoothing in case of voltage dips, while the 22nF filters out high frequency noise.

  • The 4Kohm and 1Kohm (R1 & R2) resistors form the negative feedback network, and set the gain of the amplifier - in this case, 5 [(4/1)+1].

  • The 22Kohm (R6) resistor on the audio input is a pull-down resistor, there to give an open circuit a path to ground if no audio source is connected (noise filtering).

Questions:

  1. Typically, I've found recommended values of 10uF and 10nF for decoupling capacitors. I used 22nF capacitors for C3 because that was all I had, but it seems to work fine. How are these values determined, and what is ideal?

  2. There is a ferrite bead on the input of each power rail (green on the schematic). I used 45ohm ferrites (again, all I had) although the source schematic called for "6.9ohm" ferrites. I understand that ferrite beads are used to block EMI interference... somehow... but again how these values selected?

  3. What does C1 (150pF) parallel to the audio input do (and how was its value chosen)?

  4. Ditto for R3 (1Kohm) on the audio input?

  5. Ditto for R4 and R5 (10ohm) on the output of each opamp?

  6. Lastly, the buffer (BUF634) itself. I understand that the first opamp (OPA2227) is amplifying the voltage, and that the buffer essentially does the same for current. Does this mean that if the load wants to draw more current, the buffer provides more current than the OPA2227 alone could supply?

Thanks in advance.

\$\endgroup\$
  • \$\begingroup\$ The question is reasonable, but the schematic is not. Add component designators! There is a lot that could be said about this circuit, but talking about the top left resistor next to the green thingy is too tedious. Ping me when you fix this, and I may try to answer. \$\endgroup\$ – Olin Lathrop Nov 21 '17 at 18:23
  • \$\begingroup\$ @OlinLathrop Agreed - thanks for the tip! Labels added. \$\endgroup\$ – abza Nov 21 '17 at 18:38
4
\$\begingroup\$

I'll answer in signal path order.

R3/C1 make a low pass filter which will remove high frequency interference (like cellphone RF picked up by cables) as this can be rectified and detected by the opamp and create audible noise. C1 should be a low-distortion capacitor, ie ceramic C0G, not X7R and the like. Its value is chosen to cut well above the audio band, here at about 1MHz depending on source impedance.

R6 provides a path for the opamp's input bias current to ground. Since the opamp inputs are BJT transistors they have a base current. Without R6 when nothing is plugged into the input jack, the base current would have nowhere to go, so the input voltage would rise (or fall) and the opamp would clip.

About the buffer: the opamp is a low-noise low-distortion model but it does not have enough output current capability to properly drive headphones (this is the case with most opamps). The buffer is unity-gain and has a much larger current capability. This creates a composite amp. Since feedback is wrapped around the buffer, the opamp will control it and correct the distortions introduced by the buffer. The buffer must be very fast (and layout tight) since it is placed inside the feedback loop, you want to avoid adding extra phase shift which would make the whole amp unstable (check on control theory and Nyquist stability criterion for details).

A composite amp is a pretty common design, sometimes the buffer will be implemented with discrete transistors.

R5 is a bit tricky. Normally you would not want a resistor here, as adding impedance in the output will make the frequency response depend on the impedance of the headphones, which varies with frequency. Si depending on the value of R5 it will sound a bit different. However, headphone jacks are stupid: when you plug them in, every pin shorts to pretty much everything else while the jack slides in. Thus the resistor provides protection against this short-circuit. However the buffer datasheet specifies : "Output short-circuit (to ground) Continuous" which means it is protected (it will heat up, though).

The resistor has another use: it isolates the amp from the cable's capacitance. Driving capacitive loads introduces phase shift in the loop and risks instability. So adding a resistor works well to avoid this.

About the decoupling caps:

It would be much better to replace the 22nF caps with the largest value you can get in X7R dielectric for your favorite SMD package, say 1206. More capacitance is better here. 22nF is not enough for a high current chip like BUF634, especially with the added impedance due to the beads.

A smaller cap (physically smaller) would have lower inductance but this doesn't matter here, as the inductance difference between a big 1206 and a tiny cap is swamped by the IC's pin inductance anyway.

Likewise, the ferrite beads are of dubious interest... In the way the circuit is wired, they would introduce a LC resonance with the 22nF caps on the buffer, and this could lead to ringing in the output and other nasties. If you absolutely want to have ferrites in your power lines, get the spice models from Murata website (they're a free download) and sim it to avoid any ringing.

So, I would put 10µF 25V X7R 1206 caps on the buffer's supplies, and 1µF on the opamp. But considering the quantity discount on the 10µF... 2caps=50c, 10caps=1.3€ I would just buy 10 and just use that, who cares.

I'd just remove the ferrite beads on the buffer, and replace the ones on the opamp with 1R resistors, or just remove them altogether.

If you use a noisy power supply, the place to filter it is at the connector where it enters the board, not inside the circuit where the opamps are.

If you want to make this thing short-circuit safe, mind the dissipation in the buffers, and also in R5, in a shorted output scenario. Don't use a 0805 SMD resistor for R5, it will just burn. The buffers may require a small heat sink.

As for the resistor choice, if you pay for a low-noise opamp, you may as well use low noise resistors (ie, metal film or thin film in SMD) and avoid carbon, thick film, etc which produce current-dependent noise. They only cost a couple cents extra.

\$\endgroup\$
  • \$\begingroup\$ Wow, thanks for the detailed answer! Beyond the call of duty. \$\endgroup\$ – abza Nov 22 '17 at 13:00
  • \$\begingroup\$ Just a question: Why X7Rs for the decoupling caps, instead of (say) polyester or polypropylene film? \$\endgroup\$ – abza Nov 22 '17 at 13:02
  • \$\begingroup\$ SMD X7R ceramic is very cheap and it does the job nicely. Its capacitance varies with voltage, so you can't use it in a filter (for example) and expect precision, but on a power supply which is constant voltage it's not a problem. Also the SMD caps have much lower inductance than thru-hole film caps. And you can get large capacitance in a small package for cheap. \$\endgroup\$ – peufeu Nov 22 '17 at 20:31
  • \$\begingroup\$ Great, thanks! I have some X7Rs in 1210 size, which will fit between the DIP8 socket nicely, nice and close to the pins. Onwards and upwards! \$\endgroup\$ – abza Nov 24 '17 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.