Callate 2 (MXR Gate)

Started by jfrabat, July 06, 2019, 11:18:57 AM

Previous topic - Next topic

Rob Strand

QuoteI'm happy you mentioned that. I had impression that this problem occurs only in my project because I don't use the original JFET and bipolars. This actually is another problem that is also easily fixed.
The popping sound that is heard at the end of the last clip is caused by the sharp switch-off of the JFET. In order to cure this, I connected a cap of 4.7nF between the JFET's gate and the ground. This way the gate voltage is 'soften' and the popping sound disappears. Proven!
Excellent.   So the last problem solved!.

QuoteHere are the changes in my project
Looks good.  Finally all the the bugs are out of that thing.

FYI,  at the start of this thread I re-traced the schematic of the MXR original unit.  The final schematic is at the end of this thread.

https://www.diystompboxes.com/smfforum/index.php?topic=122689.msg1157934#msg1157934

The 1uF cap on the base of the transistor was actually 10n on the original unit.   The 1uF came from an old (DIY) schematic which had a few bugs.   I don't know if you want to see what effect that has.

QuoteBTW you can support our 'young' band (I hope is not forbidden from the forum rules):
You guys sound great.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

aspangev

#101
QuoteFYI,  at the start of this thread I re-traced the schematic of the MXR original unit.  The final schematic is at the end of this thread.

https://www.diystompboxes.com/smfforum/index.php?topic=122689.msg1157934#msg1157934

The 1uF cap on the base of the transistor was actually 10n on the original unit.   The 1uF came from an old (DIY) schematic which had a few bugs.   I don't know if you want to see what effect that has.
Well done!
I'll check it this evening (now it's 6AM here). I'm very curious. When I was debugging, once I removed this cap and the gate doesn't work at all Looking now the schematic seems that 100k is on the edge of open/close the gate. Seems that it strongly depends on beta of Q2. The base current is max ~90uA. If Q2's beta is 100, then collector current is 9mA. This will make voltage drop over 150k resistor of about 1.3V but this is valid if there is no 1u cap. This 1.3V is not enough to close the Q3 gate. If beta is 300, then it will work... My opinion is that this 100k should be chosen depending on the used Q2. Strange, it is the first time I see a schematic that so strongly depends on beta.
Cap of 10n together with 100k makes tau of about 1ms. This will help open/close Q2 at the beginning. Reducing 1u -> 10n could help removing popping sound around the threshold. I'll check it.

BTW I've read some opinions in this forum and it seems that this circuit is very sensitive on the right choice of components - Q1 - Q3 and probably the right choice on OpAmp's. This means that the design is not the best ever made. I'm pretty sure I can make it more robust, starting with the JFET - replacing with MOSFET.
"Digital!? Every idiot can count to one..." - Bob Widlar

Rob Strand

QuoteI'll check it this evening (now it's 6AM here). I'm very curious. When I was debugging, once I removed this cap and the gate doesn't work at all Looking now the schematic seems that 100k is on the edge of open/close the gate. Seems that it strongly depends on beta of Q2. The base current is max ~90uA. If Q2's beta is 100, then collector current is 9mA. This will make voltage drop over 150k resistor of about 1.3V but this is valid if there is no 1u cap. This 1.3V is not enough to close the Q3 gate. If beta is 300, then it will work... My opinion is that this 100k should be chosen depending on the used Q2. Strange, it is the first time I see a schematic that so strongly depends on beta.
Cap of 10n together with 100k makes tau of about 1ms. This will help open/close Q2 at the beginning. Reducing 1u -> 10n could help removing popping sound around the threshold. I'll check it.
Yes the Beta has an effect on the strength of the collector current pulses.  The way I look at it is if the transistor gain is low the collector current pulses will be small and the attack time will become longer.    The MXR Dynacomp compressor has a similar arrangement for the rectifier, it uses 10nF caps.

The circuit acts like a peak detector but the details are no so easy to understand.  The base-emitter diode charges the base cap and the 100k provides the discharge time constant (like you mentioned).    When the base cap is large it will discharge more slowly.   At the time of the next peak the cap voltage will not drop much so you might expect the current pulse to be more narrow.  However, because the cap is large it takes longer to charge.  A smaller cap will discharge to a lower voltage but it will charge-up quicker.  On the simulator the width of the base current pulses stays almost the same.  What changes is the base current.   The base current is higher with the larger cap.   So perhaps the cap can compensate for a low beta.   To me it's a little weird have a 47nF coupling cap feeding a 1uF peak detector.  I thought the 47nF cap might charge up but it doesn't seem to charge because the current pulses are narrow.

Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

aspangev

Hey Rob

I spent few hours playing with the circuit. First I checked behavior with 10nF instead of 1uF. Honestly I don't see huge difference. With 10nF it seems the noise-gate to be more sensitive meaning that it is opening easier but closes harder. For me open gate means you hear the sound, closed gate means there is no sound and noise. I liked the behavior with 1uF but to be closer to the original schematic I choose 100nF.
I changed also 10uF cap in JFET circuitry to 1uF (mod 6 from my list) and for me it's working better - no impact on the sound but the noise-gate starts faster after power-on.
I also decreased the gain of OA1 stage by replacing resistor 680 -> 2.2k. It makes the sensitivity pot more sensible in the whole range of the pot.
Changed also the output cap to 22uF - doubled the original cap because of using with a bass guitar.

List of all my changes:

1. I don't see benefit of using the 3 knobs: ATTENUATION, ATTACK and RELEASE so I removed them. I just increased the 'release' resistor to 680k. I prefer slower release. It's actually less than a second.
2. Increased all signal capacitors because I use it for a bass guitar.
3. Connected 4.7nF cap on the JFET gate - removes the popping sound around the threshold of the gate.
4. Decreased 22k -> 4.7k resistor connected to the Q1 emitter - removes the hizz we discussed earlier.
5. Added LED for visualization the gate. Used NMOS BS170 but can be any small power NMOS with Vth ~ 2V
6. I don't see benefit of using such big cap (10uF) in JFET circuitry. I face a problem, when I switch-on power supply the output is muted for about 10 seconds before I could start playing. This probably is caused by charging this big cap through 1M resistor. Calculated, RC = 10 sec. I believe a 1uF cap will be enough. The cut-off freq will be 1/(2Pi*1u*22k) = 7.2Hz which for me is enough.
7. Changed 1uF/NP -> 100nF - closer to the original value
8. Changed 680 ->2.2k in OA1 stage

Used devices: TL072, 2xBC549C, JFET - PN4393

The final choice:



I also played little bit with mods 3 and 4 in order to show what is the difference with/without them:
No 3 and 4 mods:
https://www.aronnelson.com/DIYFiles/up/No_Mods.mp3
Only mod 3:
https://www.aronnelson.com/DIYFiles/up/Mod3.mp3
Mod 3 and 4:
https://www.aronnelson.com/DIYFiles/up/Mod3and4.mp3

Here the first 'chord' is at MIN sensitivity while the second is at MAX sensitivity.
You can still hear popping sound with mod 3 at MIN sensitivity but it is softer. If your sensitivity is in reasonable level, then this popping almost disappear.

I'm thinking about inserting hysteresis on the open/close thresholds. I've got this idea by looking at the MXR D80 noise gate -  there are 2 different circuits for both thresholds but for me it is easier to do it here by adding an additional MOSFET which changes the gain of the first OA stage.

Best regards
Atanas Pangev
"Digital!? Every idiot can count to one..." - Bob Widlar

Rob Strand

#104
Excellent documentation and much improved behaviour.

QuoteI'm thinking about inserting hysteresis on the open/close thresholds. I've got this idea by looking at the MXR D80 noise gate -  there are 2 different circuits for both thresholds but for me it is easier to do it here by adding an additional MOSFET which changes the gain of the first OA stage.
A Schmitt trigger might help but what I've found is it's better to do some filtering before a Schmitt trigger. 

What about adding a cap across the 1M resistor on the opamp.    The original circuit used an LM741 with a very high gain, so high that the opamp starts to operate like a low-pass filter.  Using a TL07x loses that effect and adding a cap across the 1M restores the filtering.  To match the LM714 you need about 150pF to 180pF but there's no reason not to use larger values if it works better.   frabat noticed some improvement with the cap.

You should check out the Boss noise gate schematic.    It's like a better version of the MXR.  They use a full-wave rectifier.   They also have specs for the behaviour in the tail and added trimpots to set-up the tail behaviour.  I can only guess they did this for consistent behaviour.   Maybe it avoids some of that weird behaviour.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

jfrabat

#105
Quote from: aspangev on August 26, 2019, 08:10:09 PM
jfrabat, please change the resistor on Q1 emitter from 22k to 4.7k. This significantly will decrease the buzz to levels that you can't hear it.

Left everything else as was; changed this, and, while I cannot say the fizz is 100% gone, I can say that it almost is!  Level has gone down dramatically, and goes down even more as you start closing the gate (and since there is no sense in turning on a gate with the gate fully open, this helps!).  Also, now the gate fully closes.  Only if I strum REALLY hard, does it open (and for a fraction of a second) when it is closed.

Thanks @aspangev for this!  And everyone else for also lending me a hand!

I will also ad the mod 3 to mine (not done it yet).
I build.  I fix.  I fix again.  And again.  And yet again.  (sometimes again once more).  Then I have something that works! (Most of the time!).

aspangev

Thank you too, jfrabat
Honestly if hadn't read about it I wouldn't dig into the problem ;)
"Digital!? Every idiot can count to one..." - Bob Widlar

nonost

I had the same problem. An annoying bizz with the gate open or semi open.

Did all the mods in the universe. No luck. Only two things worked:

1) Reducing the gain of IC1a. 10k instead of 680r
2) Keeping the high gain, but increasing the 47pf cap across the 1M. From 330pf to 1nF

What's doing that cap? At 1nf there's no noise/harsh clipping at all. And this is with 1M and 2k2 resistor in IC1a.

I tried tons of ICs, bipolars & FETs. They are not the problem.

Cheers!

antonis

Quote from: nonost on May 18, 2023, 05:03:11 AM
Keeping the high gain, but increasing the 47pf cap across the 1M. From 330pf to 1nF
What's doing that cap?

Although it isn't shown in the vast majority of respective schematics, that cap forms a Low-Pass filter with 1M resistor..
(frequencies above -3dB cut-off point are attenuated or, more presicely, aren't amplified following the (1+1M/2k2) gain formula..)

The impedance ZC (capacitive reactance = 1/2π*f*C) of that cap is set in parallel with 1M resistor, resulting into [1 + 1M*ZC / 2k2*(1M+ZC)] frequency dependent gain formula.. :icon_wink:

A more crude approximation could be:
The higher the frequency (or the capacitor value or both) the lower the capacitor resistance hence the more the "leaking" out of the 1M resistor current resulting into lower negative feedback closed loop gain..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Rob Strand

#109
Quote from: nonost on May 18, 2023, 05:03:11 AM
I had the same problem. An annoying bizz with the gate open or semi open.

Did all the mods in the universe. No luck. Only two things worked:

1) Reducing the gain of IC1a. 10k instead of 680r
2) Keeping the high gain, but increasing the 47pf cap across the 1M. From 330pf to 1nF

What's doing that cap? At 1nf there's no noise/harsh clipping at all. And this is with 1M and 2k2 resistor in IC1a.

I tried tons of ICs, bipolars & FETs. They are not the problem.

Cheers!
For (1), the original circuit used an LM741 with a lot of gain.  So much that the opamp runs out of gain and roll-off the high frequencies.  So if you use a wider bandwidth opamp you need to add that cap to roll off the high frequencies.   If you don't the high gain makes that part of the ckt prone to oscillate due to layout.   I've posted some stuff in the past about choosing that cap value.

Given that opamp clips it's also possible that if you don't have a good layout or bypass caps on the supply that noise could get from the power rail back into the audio - sort of like how LFO clicks get into the audio on phasers.   You could try an RC filter on the supply to that opamp.

Another issue I found is the particular JFET could cause issues.  Many JFETs people source these days have low VP and sometimes low Rds on.  Low Rds On JFETs are likely to cause problems on that circuit.   What can happen with low VP JFETs is the ripple on the gate can modulate the JFET a lot more.  This is especially true in the region where the gate is just closing.

In this thread I saw a lot of potential for problems in that circuit.   jfrabat's post plugged up some but there's others and maybe your case has problems in the other areas.

Don't forget the most of the schematics are wrong, please checkout my retrace thread, which is linked a few posts back in this thread.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

nonost

Ey Antonis! I see...Well, the detector doesn't seem to bother the LP filter. It looks quite aggressive with the 1nf value, but it's working.

Hi Rob. Yes, I followed your schematic. I tried plenty of FETs, bipolars and ICs, and that nasty clipping only goes away with the cap across the 1M resistor.

With single coils, a low value as 100pf might be sufficient. But with a PAF in the bridge position, you get that bizz. That's only at low settings, which is a good thing...

I used some vero layout from tagboardeffects. After a bit of tweaking with the rows regarding OP1a, the clipping got a bit better...Next time I'll make a new layout. So far, the 1nF cap did the trick.

Pretty interesting the LM741 stuff, makes sense. I tried all the mods around...But I didn't see people increasing the cap over let's say 220pf. As I said, this clipping "appears" with hot or medium output pickups. With single coils you can get a away with 100pf and a good layout.

Yes, I have an RC filter and I even put a 100nf cap also right into pin 8.

Right now it's working great. Only complaining is output being a little bit below the bypass. It's subtle but noticeable.

Cheers!

Rob Strand

It seems your problem is definitely around that opamp. 

Back in my mind I think 330pF is about right to match the original roll-off but if you have problems you don't have have a choice but to increase it.

As far as the signal loss is concerned you might be able to shave off some loss:
- decrease the 22k (between the BJT and JFET) a bit; try 15k
- increase the 1M (across the S and D of the JFET); try 2M2
- raise the two 1M resistors which set the VCC/2 voltage pin 3 of the second opamp.

At the moment there is effectively 3x1M resistors in parallel, at pin 3 of the second opamp, which appear after the 22k resistor.  3x1M in parallel is 333k so that forms a divider with the 22k of 333k / (22k + 333k) = 0.94 = -0.6dB.  Which you have to add onto the loss from the BJT buffer.

If you have changed the 22k emitter resistor to 4k7, from the jfrabat mods, you will reduce the loss if you use a high gain transistor for the buffer;  especially when the guitar is connected.

Each individual change is probably small but the sum of all of them might shave off some attenuation.


Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

nonost

330pf is good for classic PAF type bridge humbuckers. There's only a tiny bit of clipping and it's in a very narrow sweep of the pot. I put the 1nf because it might be used with hot pickups in the near future, so just to be safe. For low-medium output pickups I would throw a 330pf and call it a day.

I tried 200hfe to 300hfe bipolars. Maybe a 500hfe one could help for that tiny loss in volume. I thinks it's a better idea than changing plenty of stuff around. Yes, I'm using the 4k7 at input buffer.

The gate responds pretty well. It opens and closes quite smoothly. I find the release pot a good feature. 500k pot + 68k yield around 650ms. Below 68k the gate gets kind of stuck/bugged releasing.

BTW, if I increase the voltage supplied to FET source&drain to let's say 6v, would I get more attenuation? Or does it need further modifications?

Thanks a lot Rob!


Rob Strand

Quote from: nonost on May 19, 2023, 06:02:55 AM
330pf is good for classic PAF type bridge humbuckers. There's only a tiny bit of clipping and it's in a very narrow sweep of the pot. I put the 1nf because it might be used with hot pickups in the near future, so just to be safe. For low-medium output pickups I would throw a 330pf and call it a day.

Regarding the buzz.   Something that really bugged me about the MXR noise gate, especially with the incorrect 1uF base cap, is the threshold opamp is driving straight into the base of the transistor.   The caps are there but they might cause other issue.

Firstly driving into the base makes the opamp output a lot of current.   And secondly the capacitor could form a capacitive load for half a cycle which might cause the opamp to go unstable.

A mod to get around that would be say a 470 (to 1k or more) resistor in series with the 47nF cap at the output of the detector opamp.  That resistor would fix both those problems.   I don't know if it is *your* problem but it's not good.

FWIW, increasing the feedback cap can sometime help avoid oscillations but there is a point where it isn't a solution.

Quote
I tried 200hfe to 300hfe bipolars. Maybe a 500hfe one could help for that tiny loss in volume. I thinks it's a better idea than changing plenty of stuff around. Yes, I'm using the 4k7 at input buffer.
Yes, maybe best to leave good alone.

Quote
The gate responds pretty well. It opens and closes quite smoothly. I find the release pot a good feature. 500k pot + 68k yield around 650ms. Below 68k the gate gets kind of stuck/bugged releasing.

That's a tricky one.   The 68k obviously requires the transistor to pull more current to open the gate.   Perhaps the need to back-off the signal gain at the opamp has cause the drive the transistor to be so marginal that when you get to 68k the circuit no longer works.

Quote
BTW, if I increase the voltage supplied to FET source&drain to let's say 6v, would I get more attenuation? Or does it need further modifications?
More attenuation would require a lower resistance from the JFET.  There's two options:
- a lower rds_on JFET
- make sure the gate voltage is rising high enough (gate-source voltage getting near 0V => JFET on)

For the attenuation the closer you get the gate-source voltage to zero the more attenuation.   It's possible to play around with the part values a bit.

A higher zener voltage would help the gate open on high VP JFETs, but you can lose signal/opamp headroom.

I've a added a few notes on attenuation in the comments:


For the gate open case:



Varying Rc:



Now Varying Rc with the sensitivity dialed back:



In the last case you can see if the sensitivity is marginal varying the Rc value can prevent the gate opening.   This is a contrived example but it could be happening.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.