Comments
45 comments

I’d be interested in knowing how to measure SNR and THD, although this seems like a good article: http://www.rane.com/note145.html. If you have a decent scope (and a signal generator for THD), they don’t seem too hard to measure?

Get yourself a good soundcard (24Bit, 96KHz) and a software that can make fourier spectra: (maybe something like http://www.baudline.com/ or http://www.qsl.net/dl4yhf/spectra1.html ). 16bit is 97dB, much more sensitive than and sensible scope (typically 8bit (48dB) or 10bit(60dB) resolution).

Pete - at 6:03 you mention using an electrolytic cap for the input high-pass filter. Electrolytic capacitors are polarized, are they not? Seems like you’d want a non-polarized cap for a situation where neither leg is connected to ground (as opposed to the 1.59uF cap you’ve got hanging off the bottom of this circuit). Thoughts?

Also, I’d love to see some entry-level discussion of real-world frequency response design, pole/zero calculation and design, etc, for projects like this. I studied it in school, but as is all too often the case I got the theory without the practical applications. I’d love to hear your take.

Good catch. In general, you’ll want to have the negative (cathode) side to the lower DC voltage. For this example, I’d put the negative side to the input and the positive (anode) side to the op amp. And I’d have a higher-rated voltage part, like maybe 35V, in the hopes that it would be a bit more tolerant of my stupidity. The input signal will be small and likely AC coupled before it gets to our circuit, so it shouldn’t be too much of an issue.

…but, there are non-polarized caps in the microfarad range that could be used. YMMV.

While a lot of the “Audiophile” guys really seem to hate electrolytics they are not as bad. They are universally used in professional audio gear (used for music production): Because pro-audio equipment tends to use rather low-impedance (most often: symmetrical) inputs, and at low audio frequencies (significantly below 50 Hz, say 10 Hz corner frequency) you need tens of µF which tend to be pretty big components if you want to use, for example, polymer film types.

If you really are concerned about long-term depolarisation and loss of capacitance (I am not), you could use two electrolytics back-to-back and bias the middle node with a high resistance to a supply rail.

I’d like to add a +1 for talking about distortion, clipping, tone modification,and all that too. Also, I’d like an ATP about the magic of how a wah pedal circuit simulates a large variable capacitance. http://www.geofex.com/article_folders/wahpedl/wahped.htm#secretcap

1). The corner frequency is 20Hz, not 10 Hz, as the cap is driven by the Thevenin-equivalent resistance of 5K.

2). Use of an arbitrarily large cap is risky, as 100uF implies a .5 sec time constant. In a system with other power drains, the supply can decay faster than .5 sec, leaving the positive input above the supply. If the IC has ESD protection diodes, the cap can discharge to the decaying supply. If the opamp were CMOS, brief “latchup” events could degrade lifetime. Also expect big power-on thumps.

At the minus input expect a -25% shift in corner frequency at pot mid-scale due to R-Thevinen, and gain vs pot is somewhat non-linear. Use of a 100K pot much worsens both, and adds thermal noise.

1) You are absolutely correct. Huh. I shouldn’t have missed that.
2) You, sir, have got some chops. And it speaks to experience, yes? I don’t think most people would retain that information on a trivia basis.

Nice, thanks Pete! I know very little about circuits in general (just started experimenting recently) and just started on audio circuits and have been getting a lot of information from series like yours.

I’m curious about what would be a good, simple design for a differential to single-ended output conversion circuit. In particular the WT32 Bluetooth module you guys sell output analog audio via differential output and I would like to convert that to line level, single-ended output. Everything I’ve read so far indicates an OpAmp is what I would use. I’m just not sure about what goes around it in a circuit like that.

Honestly, I don’t have a great reason, besides that I just tend to use inverting cuz I’m used to it. There might be situations where I might be concerned with the phase of a signal from input to output, but I’m not driving a speaker here, so I don’t care about inducing positive feedback. But a non-inverting circuit would work just fine, and I’ve seen more of those in pedal designs.

Hey Pete,
Sorry if this has been suggested already, but I would like to see how what other hobbyists are doing with there homemade arduino’s. Breadboard and through hole solder construction. I’ve got a servo controlled pan tilt with a laser module (switched from the controller using a transistor) running on my duemilanove. It drives the cat crazy, a lot of fun.

Once I get a little farther with my project I wouldn’t mind showing it off, what components were used and why. Then let you and the audience (hopefully positively) comment.

Pete, well done need more…will look for more
I would like to see a microvolt input (like from a T type thermocouple wire temp sensor )be amped up and then converted to digital with a .5% resolution
it would be nice to include a voltage regulator

If you all want to learn filter design and how to understand/analyze frequency response, I suggest watching the MIT videos on it. There is a lot of content in this and every little bit (heh, pun) is useful. An average EE student will spend about 1.5 years in signal analysis courses (ranging from AC/DC signals to probability of signals in a system, aka multiple signals with noise) and most will not understand it. (Hell, when I took a DSP course, I really didn’t understand it until I read an article detailing LTE tech AFTER college).

I’d love to see Pete explain it, but there might not be enough time for him to explain all the key points in 30 minutes or less…

With regards to op amps, recently I had to do a project where I needed to amplify a 0-30mV signal to 0-5V. I think I figured it out by using a non-inverting 500:3 gain amp circuit, but I’m unsure if my voltages and part selection is correct. This specific signal is from a torque sensor. Can you do an episode where you talk about single supply dc low frequency signal amplification?

With a torque-sensor you are most often dealing with a small differential voltage hovering at an elevated potential.

(see, for example, http://en.wikipedia.org/wiki/Wien_bridge )

What you need is a circuit with as high as possible CMMR and PSSR (common-mode rejection, power-supply-rejection): The output signal should represent the input (differential) voltage, but not unwanted signals generated by the simultaneous swing of both inputs (=common mode) or generated by noise on the power supply.

For this one uses a “instrumentation amplifier” that consists of two very high impedance signal inputs and integrated difference amplifier. http://en.wikipedia.org/wiki/Instrumentation_amplifier (R_gain is the potentiometer used to vary the gain.)

Ballparking the cap value depends on the part’s position in the circuit. For the coupling caps, lower frequencies won’t pass (caps are higher impedances at lower frequencies). A higher value cap in that spot will pass lower frequencies. For the decoupling cap (the one on the reference voltage), same sort of thing except that I’m passing noise to ground, so a larger value just passes more noise that way. For the feedback cap, you want everything that you want to keep (maybe 0-20KHz) to be covered by the R2/R1 gain. A higher value cap in that position will again pass lower frequencies, but you don’t want it to come down into your sound (like not less than 20KHz), so you can’t pick an arbitrarily high value or all of your audio will get fed back. No good. I’d suggest playing with the equation a bit to see how things change when you change one value.

SparkFun is an online retail store that sells the bits and pieces to
make your electronics projects possible. Whether it's a robot that can
cook your breakfast or a GPS cat tracking device, our products and
resources are designed to make the world of electronics more accessible.

In addition to products, SparkFun also offers
classes and online tutorials to help educate
individuals in the wonderful world of embedded electronics.