What does that bit there do? Learning to understand circuits.

Started by dano12, July 26, 2006, 10:29:32 AM

Previous topic - Next topic

analogmike

Quote from: R.G. on July 29, 2006, 10:37:43 AM
Quote
JFET buffer
R1 and R2 – In addition to the description: A lower noise way to do this is to make R1 and R2 be much lower valued, perhaps 10K, and couple their junction to ground with a capacitor. Take a high value resistor of 1M or over to the junction of the JFET gate and C1. This eliminates all of the current noise that the bias resistors would produce, and 1/2 of the thermal noise. The technique is know as "noiseless biasing", and is a neat trick that most beginners never get presented.

MXR Micro Amp and Distortion+ biasing, I think.  :)

A little example to go along with all this theory.

This thread rules, thanks RG and everyone!
DIY has unpleasant realities, such as that an operating soldering iron has two ends differing markedly in the degree of comfort with which they can be grasped. - J. Smith

mike  ~^v^~ aNaLoG.MaN ~^v^~   vintage guitar effects

http://www.analogman.com

dano12

So what's next. How about diode clipping? I know a little about it but it is such a rich vein, we might as well mine it....

Maybe cover how diodes actually clip a signal, different types, in the opamp feedback loop vs. the output, germanium, silicon and MOSFET devices, symmetrical vs. asymmetrical, etc.

And how about we add in using tubes as clipping diodes (something I know nothing about, let alone whether its possible but it sounds wicked cool).

Your humble servant,
-dano



disantlor

Quote from: dano12 on August 02, 2006, 09:47:04 PM
So what's next. How about diode clipping? I know a little about it but it is such a rich vein, we might as well mine it....

Maybe cover how diodes actually clip a signal, different types, in the opamp feedback loop vs. the output, germanium, silicon and MOSFET devices, symmetrical vs. asymmetrical, etc.

And how about we add in using tubes as clipping diodes (something I know nothing about, let alone whether its possible but it sounds wicked cool).

Your humble servant,
-dano

DISCLAIMER: LISTEN TO ME WITH CAUTION UNTIL VERIFIED BY R.G. AND FRIENDS :)

Being more a student of this thread, there isn't much I can offer, but I can at least share a revelation I had about clipping diodes while reading one of R.G.'s articles.  I think I was initially thrown off by the phrase "clipping diode".  I imaged that the diode itself was doing the clipping, and in a way it is.  However I found it easier to think of it as a "clipping-enabling diode".  What I mean is that, at least when placed in the feedback loop, the diode prevents the gain device (transistor, opamp) from continuing it's linear increase once the diodes drop voltage is broached; the diode on it's own won't do this.  This is probably best explained with an example.

Using an ideal opamp and a diode drop of .7V as an example, imagine x volts at one input of the opamp.  Now because the opamp's job is to maintain equal voltages at it's inputs, the opamp has to swing its output terminal such that this disparity between the inputs (caused by the presence of a signal on one, and not the other) is alleviated.  The ouput needs to be connected to the other input for it's output to cause a change in the difference between the two inputs; this is the feedback loop.  If the output was connected to the non-signal input with a short circuit, there would be no gain because the output would only have to match the input for things to be equal.  However with a resistor in the way, the opamp has to work a little harder to normalize its inputs, so it has to put out more voltage to achieve the same effect, hence gain.  The diodes come in when the signal approaches the limit (set by the diode drop).  The diode turns on and short circuits the gain resistors limiting the ouput from rising any further, hence a flat, "clipped" waveform.

Now because the diode drop is fixed, one way to vary the gain is to vary the level of the input signal into opamp with another gainstage.  So it's really approaching the problem from the other end; rather than adjusting the clipping point (we can't, the .7V is fixed), we adjust how hard the signal is driven into this clipping stage, effectively changing the clipping point.  Sorta like how some compressors don't have a threshold setting (it's fixed and internal), just an input gain, which drives more or less of the input above the threshold.

I hope my version of the story is correct, I'll feel like an ass if it isn't!!  Not the full picture by any means, but it got me thinking on the (hopefully)right track.  Hope it helps.

R.G.

QuoteMaybe cover how diodes actually clip a signal, different types, in the opamp feedback loop vs. the output, germanium, silicon and MOSFET devices, symmetrical vs. asymmetrical, etc.
That's a good example of a simple question with no simple answer. Each case is a whole study in itself.

A diode is a good example of a simple non-linear resistor. For a normal resistor, the current through it depends linearly on the voltage across it. So ohm's law ( I=V/R) holds and a graph of I versus V is a sloped straight line. For a diode, the current is best described by  I = K e^mV where K is some constant, m is some other constant, and "^" means "to the power of". "e" is the base of natural logarithms, 2.718.... What this does is that as long as mV is below 1, the resulting current is below K. When the term mV gets over 1, then you get current which turns up and heads for the moon. For silicon, the K and m terms make the turnover voltage about 0.7V.

What that means is that a diode hardly conducts at all (i.e., effective resistance is big) until the turnover point, and then its resistance drops to quite small.

So let's clip a signal. We have this here signal generator that puts out an AC signal voltage which we can adjust from 1uV peak to 10V peak. Since our signal generator is perfect ('cause it's imaginary 8-)  ) we put some resistance in series with it to fake a real signal generator. So let's say we have a 1K resistor in series to a diode to ground. We put an oscilloscope across the diode.

What we see is that for small signal the signal is unchanged. That's because the diode resistance is much, much higher than 1K for all signal voltages. As we turn the signal voltage up, when the signal gets somewhere between +0.4 and +0.6V from anode to cathode, the resistance of the diode changes from very high to below 1K. When that happens, the signal sees a voltage divider of the 1K signal generator and the resistance of the diode. Within a couple of tenths of a volt, the diode resistance goes from over 1K to much less than 1K, so above 0.6 to 0.7V, the signal flattens off as the 1K prevents the signal generator from providing enough current to make the diode voltage go up anymore. So the signal appears to be clipped off at 0.6 to 0.7V for as long as the signal is greater than that.

For signals reversing the diode voltage, the diode never conducts, it always looks like a big resistor and so the undisturbed signal appears for those voltages.

If we put another diode in anti-parallel to the first, anode to cathode both ends, then the clipping effect happens for both polarities of signal, and we get a signal clipped on both top and bottom.

Questions on this one?
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

dano12

Wow I haven't even posted the next set of schematic/questions and you guys are already posting the answers.

Not only are you guys great resources, you are also apparently pyschic. :)

Someone point me to a starting point for tube clipping (if there is such a thing) and I'll get busy.

R.G.

OK, no questions on Diode Clipping 1. I must have had one of my rare lucid moments.  :icon_lol:

So with that in hand, what's the difference in diodes?

Diodes differ primarily in conduction voltage and knee sharpness.

Conduction voltage is the voltage at which the current per added volt across the diode starts to increase rapidly.
Knee sharpness is the degree to which the sudden change in conduction makes a sharp corner versus a rounded turn as current increases.

Conduction voltage determines how big a signal the diode will pass before clipping. LEDs are made out of non-mainstream semiconductors like Gallium Phosphide, Gallium Aluminum Phosphide, etc. Weird stuff. The different materials change the values of K and m in their diode equation, I = K e^m*V. What that does is make them have conduction voltages where the current increases rapidly of 1.5 to 3.0V for normal LEDs, about 2-4 times what it takes for a normal silicon junction to turn on. And you have to feed them a signal with peaks that big or bigger before they will turn on at all. Germanium's values of K and m make it start conducting somewhere between 0.2 and 0.3V.

Knee sharpness is what determines the abruptness of conduction, and has an effect on the harshness of distortion. The rounder the diode knee in comparison to the signal height, the smoother the distortion. This is true in general for distortion - the more sudden the change in clipping, the harsher and buzzier the sound. For diodes, there is not a huge range of knee softnesses. They are all about the same roundness. Not exact, but similar. Germanium often sounds smoother as a clipping diode if you feed it a small signal because the roundess is similar and the cutin voltage is small, so for small signals, more of the signal height is compressed into the conduction knee. If you feed it a big signal, it sounds buzzier because the signal is too big to compress into the knee.  LEDs have softer clipping than silicon by another path - they have high junction capacitances, so they tend to smooth the corners a little bit capacitively, not in their diode equation.

Questions?
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

dano12

Quote from: R.G. on August 05, 2006, 07:53:27 AM
Questions?

Questions? But of course. I understand how diodes to ground produce clipping (as in the Rat).

But what about diodes in the feedback loop (if that's what it is...) as in the TubeScreamer? How is it clipping if the diodes aren't going to ground? I think I'm missing something fundamental here...

R.G.

Let's think for a moment about how opamps work.

First, inverting opamps. The non-inverting input is tied to some reference voltage between the most positive and most negative power supplies, so we'll call it ground, or 0V. The opamp amplifies the difference between the + and - inputs by about a zillion, and that voltage appears on the output.  If we put a resistor from output to the - input, then the more positive the + input gets, the harder it drives the - input, and that forces the - input toward the + input's voltage, so the whole thing balances out with the + and - inputs at the same voltage, plus or minus a gnat's eyelash of error voltage.

What happens if we put some current into the - input? It drives the - input higher, which causes the amplifier to amplify that voltage by negative one zillion, and that voltage appears on the output, which sucks current out of the - input through the feedback resistor until the + and - inputs are at the same voltage again. In fact, if we force a constant current into the -input, the output drops low enough to make the feedback resistor just suck that same amount of current OUT of the - input to rebalance the two inputs. And since the current coming out of the - input is equal to the current coming in, the - input neither eats nor sources any of that current. The output of the opamp eats the current through the feedback resistor. Thanks to Georg Ohm, we know that the voltage across that feedback resistor will be the current times the resistor, or Iin*Rf. And since the two inputs are both sitting at 0V, because they have to, then the output votlage at the opamp is -Iin*Rf.

Now we make our current source be a voltage through an input resistor. That is, we put a voltage source thorugh Rin. Since the - input must be at 0V matching the + input, then the current into the input must be Iin = Vin/Rin. And the output voltage will be Vout = -Iin*Rf, so the output voltage must be Vout = -(Vin/Rin)*Rf and a little bit of algebra gives us the gain Vout/Vin = -Rf/Rin.

Yes, yes, I know. I'm getting to the point now.

What happens if RF is paralleled by two diodes in anti-parallel?

We still have exactly the same input current, or Iin = Vin/Rin. As Vin increases away from 0 in either direction, the output voltage changes by Vout = -Vin* Rf/Rin. And it does so right up to the point where one of those diodes sees a voltage across it where it starts to conduct.  When the conduction starts, the diode resistance changes from essentially an open circuit to a much lower resistance, as low as a few ohms if you drive it really hard (i.e., with lots of current). And when that happens, the gain of the whole setup changes. We still have the current drawn from the - input by the output being equal to Iin. But it's now being drawn through a diode, and the diode only needs its forward voltage across it to move that amount of current. The opamp doesn't know anything has changed. All it knows is that all of a sudden it doesn't have to move its output as far to pull the current stress off its - input.

The diodes are run in constant current mode, the current always being equal to the input current, Iin = Vin/Rin.

And it works the same for both polarities.

Questions?
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

WGTP

http://www.elixant.com/~stompbox/smfforum/index.php?topic=38581.0

I keep posting this because it has good stuff in it.  There have been many discussions about this topic and it always facinates me.  I think I see it as the "Heart" of the distortion, although there are many other factors involved.  I seem to prefer distortions that clip 2 or 3 times.

Of course the op amp also gets into the act.   :icon_cool:
Stomping Out Sparks & Flames

R.G.

QuoteOf course the op amp also gets into the act.
Eventually.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

analogmike

Here's one I get asked about a lot- order of components in series. Normally it makes no difference if you have a resistor and cap in series, to reverse them. But sometimes it does, due to the high pass filter effect. For example see tonepad's clever layout for Dist+ and Micro amp using the same board:

http://www.tonepad.com/getFile.asp?id=6

The non inverting input of the op amp to ground (and a cap) sets the gain in both of these. It goes through the gain pot and a capacitor.

It would seem much easier to put the pot at the end, with one end to chassis ground- then only one wire from the board would be needed. That's the Dist+ way. But MXR reversed the order of the cap and resistor (one resistor electronically, 2 resistors physically, one is a limiting resistor) on the Micro amp, and seems that tonepad did the same thing.

Maybe R.G. can explain when you can and can't reverse series components better than I can.

DIY has unpleasant realities, such as that an operating soldering iron has two ends differing markedly in the degree of comfort with which they can be grasped. - J. Smith

mike  ~^v^~ aNaLoG.MaN ~^v^~   vintage guitar effects

http://www.analogman.com

R.G.

QuoteMaybe R.G. can explain when you can and can't reverse series components better than I can.
You can ALWAYS change the order of series components as long as there is no contact to the middle connections. In the case of the D+ board there, the order of C4, R6 and R7 is immaterial. It should be done any way that makes your wiring work easily.

The impedance of any two components in series is always just the sum of their impedances. There is no high pass effect to be had with a cap and a resistor in any order if you measure only at the two ends of the string. Obviously, you can't reverse polarized components in a series string without changing things, but if you keep them in the same polarity, you can put them in any order with no changes outside the string.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

analogmike

thanks, that is what I thought. (it's been a long day, 13 hours of work so far and more to come. Eating Gyro dinner at my PC now).

It's odd that MXR and everyone who makes MXR layouts builds them the hard way when it's so much easier to change the micro amp to the dist+ style. Maybe tonepad can change their layout, will remove two parts and a wire.

have fun and get a real job so you don't burn out like me ;)
DIY has unpleasant realities, such as that an operating soldering iron has two ends differing markedly in the degree of comfort with which they can be grasped. - J. Smith

mike  ~^v^~ aNaLoG.MaN ~^v^~   vintage guitar effects

http://www.analogman.com

dano12

To distill some of the clipping information so far, perhaps we should use the MXR Distortion + as an example to walk through. This one uses diodes for clipping at the output of the opamp. (Later we can look at diode clipping in the feedback loop of the opamp)

Here we go:


SW1: Power on/off, just like the previous circuits

R1 and R2: These form a voltage divider that presents the non-inverting input of U1 with 4.5 volts. Pin 7 of the opamp is the V+ connection, and it gets 9 volts. This sets the bias point for the opamp.

C1: We haven't seen this one in the previous schematics—a small value cap from the top of the middle of the voltage divider to ground. Purpose?

C2, C3 and R4: What is this? It looks a bit different than our previous examples of the input stage that forms a high-pass filter and stabilizes the bias point. Hmm.... Is C2/R4 the high-pass filter, and if so, what does C3 do?

U1: The LM741 single op-amp provides the gain for the circuit.

General Question 1: For the Distortion + specifically, and pedals in general: does the opamp perform any of the clipping? Or is it all the diodes, or a combination of both? Is opamp clipping desirable? What are the general design parameters for mixing opamp clipping with discrete diode clipping?

R9/C4/R5/R6: Ok, it looks like this is the feedback loop. The signal passes from the output of the opamp, through R9 back into the inverting input of the opamp. Here's my guess at what is happening. The more of the output signal that is fed back into the inverting input, the less gain the opamp is going to produce. The R6 pot bleeds more of this inverted signal off to ground as you turn it up, hence more gain. Is this correct, and what is the purpose of R5 and C4?

C5 and R7: C5 blocks DC voltage from leaving the opamp stage. R7? Not sure....

C6: Small cap to ground: what does this do?

R8: This controls the amount of output signal presented to the output of the circuit. Like the previous circuits in this thread, the pot controls the ratio of output signal vs. attenuation to ground that the output sees.

D1 and D2: R.G. talked about a diode as a non-linear resistor. Up to a certain amount of input voltage and the diode doesn't pass any through to ground. However, once the input gets up to the diode's turnover voltage, the diode passes the voltage on to ground. So D1 is going to clip off the top of the AC waveform once the opamp has amplified the input voltage to a certain point. D2 performs the same function on the bottom end of the AC waveform. Since we are using the same type of diode on each side of the waveform, the clipping occurs at the same level for positive and negative swings—hence we have symmetrical clipping. The 1N270 part specified is a germanium diode—these have a softer clipping sound. Go back and re-read R.G. explanation of the different types of knees in clipping diodes for more info.

Question 2: What does it sound like if we only clip off the top, or just the bottom? In other words, would it be of any use to play around with having only D1 or D2 in circuit?

Question 3: There was a posting a while back from a fellow who had created a clipping circuit that had a very odd shape. I think it was like devil horns, or some similar analogy—does anyone recall this?

As always, questions and answers welcome....

Fret Wire

First, might as well get the pot values correct. Gain is 500KC and Volume is 50KA.
Notice anything about the biasing set-up, value wise?
And yup, the D+ distorts without diodes. My guess, it's a combination of the 741's specs and the biasing current. It's part of this ckts character, you probably wouldn't want too much OA clipping in other ckts.
Fret Wire
(Keyser Soze)

dano12

Quote from: Fret Wire on August 08, 2006, 11:28:08 AM
First, might as well get the pot values correct. Gain is 500KC and Volume is 50KA.

1Meg and 10k are the values listed on 3 of the 4 schemes I was working from. Including the RGKeen/Jack Orman version. While the original used a reverse log pot, most of the schematics say its ok to use the values listed.

Quote from: Fret Wire on August 08, 2006, 11:28:08 AM
Notice anything about the biasing set-up, value wise?

Yep, another 1M resistor off the middle of the divider. What does it do?

Fret Wire

Quote from: dano12 on August 08, 2006, 11:38:05 AM
1Meg and 10k are the values listed on 3 of the 4 schemes I was working from. Including the RGKeen/Jack Orman version. While the original used a reverse log pot, most of the schematics say its ok to use the values listed.
Yep, another 1M resistor off the middle of the divider. What does it do?

That's the embarrassing thing about the D+, a simple ckt, and yet most of the schematics are wrong, pot value wise. Since you're doing a "technology of the D+" so to speak, why keep spreading the same mistaken pot values and tapers?

I guess it's one of my peeves.
http://www.diystompboxes.com/smfforum/index.php?topic=47202.msg348546#msg348546

Look at the values of the divider on the DOD 250. Most ckts look like this, lower resistor values and higher value caps. The D+ has high value resistors and a low value cap.
http://www.generalguitargadgets.com/diagrams/dist_250_sc.gif
Fret Wire
(Keyser Soze)

Fret Wire

On the grey DOD 250, disregard D4, R11 (led + resistor), C5 (smoothing cap), D3 (third clipping diode), and possibly R11 (ps). AnologMike can verify that. I've never had a grey 250 opened up in my hands. An actual pedal in your hand is worth a thousand schematics. :icon_smile:
Fret Wire
(Keyser Soze)

dano12

I updated the schematic with the original pot values per Fretwire's suggestion.

Unfortunately, I can no longer modify my posts, so keeping this thread updated may be kind of pointless.

Fret Wire

Whoops, you got 500KA for the volume when it should be 50KA.

QuoteUnfortunately, I can no longer modify my posts, so keeping this thread updated may be kind of pointless
Not really, this is a nice thread. When you've got the ckt all mapped out, start a new thread with just the schematic, and it's explanation. Credit RG for his help, and link back to the original thread. That way the new thread has the correct description of the ckt without the filler, and anyone can follow the link back to the original thread, where there are some really helpful questions and answers.
Fret Wire
(Keyser Soze)