Opamp feedback loop to VREF

Started by Passaloutre, December 10, 2022, 05:24:03 PM

Previous topic - Next topic

Passaloutre

I'm thinking about making some modifications to an existing overdrive pedal to make it more similar to a Greer Lightspeed (schematic below)

Specifically I'm looking at the second opamp stage. In the Lightspeed, R3 is grounded to VREF. Is there any reason I can't connect the bottom end of R3 to the node shared by R10, C9, and pin5 of the opamp? That node should be at VREF correct?

What about sending the bottom of R3 to regular GND (0VDC)? This would be particularly convenient for my layout. My intuition is this will mess with the feedback characteristics (unless maybe I put a big capacitor in series witht the resistor?).

Another related question: this pedal has an asymmetrical divider for VREF (4k7/5k6). Is there a good reason for this? I'm guessing it makes the power rails slightly asymmetrical and may contribute to even-order harmonics, but I don't think the signal should ever get that big?



FiveseveN

Quote from: Passaloutre on December 10, 2022, 05:24:03 PM
That node should be at VREF correct?

DC-wise yes, but that's also your signal, so it doesn't work. Ground will be fine with the cap in series (2u or more).
Quote from: R.G. on July 31, 2018, 10:34:30 PMDoes the circuit sound better when oriented to magnetic north under a pyramid?

Passaloutre

Thank you! That should be pretty simple with the existing layout.

antonis

R3 can go to any point considered as AC ground..
DC ground is also fine, as long as there is a series blocking cap (like FiveseveN said :icon_wink:)
The reason for this is to prevent DC gain, which should be the same as AC gain, in the absence of that cap..
(X2.2 here, so IC1.2 output should be permanently topped, trying to achieve 9.9V..)
"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..

amptramp

In general, I would take anything to ground that can be taken to ground, meaning only the ends of R2 and R3 should go to Vref.

The problem with C5, C6 and C8 going to ground is that they carry some current (being driven by op amp outputs) and this can feed back into the Vref supply and possibly cause oscillation.  The first stage has a gain of 154 at the highest drive setting, meaning it doesn't take much feedback to cause oscillation.  The tone control could dump as much a a milliamp into Vref and its gain of 2.2 multiplied by the gain of the first stage means you could have a problem.  Don't count on the 22 µF capacitor to eliminate AC at the Vref terminal - all capacitors have an equivalent series resistance that may be too high for it to prevent oscillation or even if not oscillation, transients in the response that you didn't want.

ElectricDruid

#5
Quote from: Passaloutre on December 10, 2022, 05:24:03 PM
Another related question: this pedal has an asymmetrical divider for VREF (4k7/5k6). Is there a good reason for this? I'm guessing it makes the power rails slightly asymmetrical and may contribute to even-order harmonics, but I don't think the signal should ever get that big?

I would guess that the asymmetrical divider is to compensate for the asymmetrical clipping in the first stage, and *prevent* clipping in the second stage. There's a direct DC path from one stage to the other, so the waveform going to the second op-amp has one polarity that is larger than the other (2 diodes vs 3 diodes). Moving the bias point a bit gives the larger signal a bit more headroom and prevents op-amp clipping in the second stage.
That's my reading of it, anyway, for what it's worth. (What I *should* do is check that the diode polarity matches this theory).

Vivek

Quote from: amptramp on December 11, 2022, 07:58:27 AM
In general, I would take anything to ground that can be taken to ground, meaning only the ends of R2 and R3 should go to Vref.

The problem with C5, C6 and C8 going to ground is that they carry some current (being driven by op amp outputs) and this can feed back into the Vref supply and possibly cause oscillation.  The first stage has a gain of 154 at the highest drive setting, meaning it doesn't take much feedback to cause oscillation.  The tone control could dump as much a a milliamp into Vref and its gain of 2.2 multiplied by the gain of the first stage means you could have a problem.  Don't count on the 22 µF capacitor to eliminate AC at the Vref terminal - all capacitors have an equivalent series resistance that may be too high for it to prevent oscillation or even if not oscillation, transients in the response that you didn't want.

and R3 should be increased (and therefore R4 too)

Better to use 39K and 47K rather than 3K9 and 4K7


Vivek

Due to asymmetric clipping,

I suppose that C9 will slowly build up a DC voltage dependent on how strong one strummed earlier

This will change the bias point of the IC1.2

Which could be a highly desirable/ highly avoidable situation, depending on what the designer wanted to achieve.

For example, that could be the basis of dynamic sag and "movement" if implemented carefully.


Passaloutre

Quote from: Vivek on December 11, 2022, 11:39:50 AM


and R3 should be increased (and therefore R4 too)

Better to use 39K and 47K rather than 3K9 and 4K7

Can you tell me why? To reduce the current? I'm just trying to learn.

Passaloutre

Quote from: Vivek on December 11, 2022, 11:45:27 AM
Due to asymmetric clipping,

I suppose that C9 will slowly build up a DC voltage dependent on how strong one strummed earlier

This will change the bias point of the IC1.2

Which could be a highly desirable/ highly avoidable situation, depending on what the designer wanted to achieve.

For example, that could be the basis of dynamic sag and "movement" if implemented carefully.

Maybe could be bled off with a very high resistance to vref?

antonis

Quote from: Passaloutre on December 11, 2022, 12:31:36 PM
Can you tell me why? To reduce the current? I'm just trying to learn.

Feedback resistors affect:
1. Noise..
2. AC response..
3. Loading, both input and output..
4. Stability & phase margin..
5. Drift..
6. Offset..
7. Crosstalk..
8,Power consumption.. :icon_wink:

https://www.analog.com/en/analog-dialogue/raqs/raq-issue-122.html
"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..

antonis

Quote from: ElectricDruid on December 11, 2022, 09:26:40 AM
(What I *should* do is check that the diode polarity matches this theory).

I've done the dirty job for you, Tom... :icon_wink:

IC1.1 output can swing 2XVf "positive" and 3XVf "negative", so by positively off-setting Vref (about 390mV), prevention of 2nd stage clipping occurs..
(actually, there is an about Vf/2 apportion over & under "ideal" +4.5V bias level..)
"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..

Passaloutre

Quote from: antonis on December 11, 2022, 02:17:16 PM
Quote from: Passaloutre on December 11, 2022, 12:31:36 PM
Can you tell me why? To reduce the current? I'm just trying to learn.

Feedback resistors affect:
1. Noise..
2. AC response..
3. Loading, both input and output..
4. Stability & phase margin..
5. Drift..
6. Offset..
7. Crosstalk..
8,Power consumption.. :icon_wink:

https://www.analog.com/en/analog-dialogue/raqs/raq-issue-122.html

I'm a novice in the electrical engineering field, so I may not have understood everything I just read, but that article seems to imply higher value resistors would increase instability. I'm sure there's a lot more to it that I'm just not grokking...

FSFX

With any of the circuits that just use a couple of resistors and a capacitor for the VREF supply you will always get some signal feeding back onto the VREF voltage as the capacitor is not a pure short circuit to ground for AC. It just depends on the way the circuit is designed as to whether this small signal voltage gets fed into a high gain input stage in-phase or out-of-phase. In some cases it will be out of phase and so look like negative feedback. In other designs it will be in-phase and can create positive feedback and instability. Also depending on the actual design, you may have both the inverting and non-inverting inputs of the op amp connected to VREF via some resistances, in which case the signal will be a common-mode signal and therefore not have any effect on stability.

Rob Strand

#14
QuoteIn general, I would take anything to ground that can be taken to ground, meaning only the ends of R2 and R3 should go to Vref.

Yes, absolutely no problem having a DC gain.   You don't *need* the cap unless you want to form a high-pass filter.

Where you can come unstuck with DC gain is:
- High gain, since you will amplify the small DC offsets by a large amount.
- Variable gain amplifier,  when you vary the gain it changes the DC at the output and that causes scratchy pots (by design!).

In the original circuit you have Vref at the input of the first amp.   The output of that amplifier will not be exactly at Vref, ie. the output has an offset.   The second opamp will have an DC input offset voltage which adds to the offset at the output of the first amplifier.    Without a feedback cap back to ground or vref that DC voltage gets amplified.    If they gain of the amp is small then nothing bad will come of it.   However, amplify 1mV offset by 1000 and that's 1V.



EDIT:
FWIW,  look up the Timmy schematic.  It has a DC connection on the last gain stage.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

johngreene

Quote from: amptramp on December 11, 2022, 07:58:27 AM
In general, I would take anything to ground that can be taken to ground, meaning only the ends of R2 and R3 should go to Vref.

The problem with C5, C6 and C8 going to ground is that they carry some current (being driven by op amp outputs) and this can feed back into the Vref supply and possibly cause oscillation.  The first stage has a gain of 154 at the highest drive setting, meaning it doesn't take much feedback to cause oscillation.  The tone control could dump as much a a milliamp into Vref and its gain of 2.2 multiplied by the gain of the first stage means you could have a problem.  Don't count on the 22 µF capacitor to eliminate AC at the Vref terminal - all capacitors have an equivalent series resistance that may be too high for it to prevent oscillation or even if not oscillation, transients in the response that you didn't want.
In this circuit, any feedback through Vref will be negative feedback. So it would change the EQ and lower the gain if anything.
I started out with nothing... I still have most of it.

Passaloutre

Quote from: Rob Strand on December 11, 2022, 04:43:26 PM

FWIW,  look up the Timmy schematic.  It has a DC connection on the last gain stage.

Yes, but it has a DC connection to VREF. I want to connect it to ground, so I think I'm going to need a cap. I just wanted to make sure that wasn't going to break anything else.

Rob Strand

QuoteYes, but it has a DC connection to VREF. I want to connect it to ground, so I think I'm going to need a cap. I just wanted to make sure that wasn't going to break anything else.
If you *want* to connect the feedback to ground then that's a whole different thing.  You have to add the cap.

If you don't at a cap then the second opamp has 4.5V DC at the input.   The opamp *DC* gain will amplify 4.5V and the output will be > 9V ie the second opamp will saturate.   The output won't be biased at 4.5V that's for sure.   When you add the cap to ground the DC gain is 1 that means if there's 4.5V DC bias at the input there will be 4.5V DC at the output and the opamp will be biased correctly.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

Passaloutre

Thank you for explaining the "why". I want to connect to ground because I am using an existing pcb, and it would be much easier given the existing board layout. There are existing connections I can use to send the feedback to ground that require fewer wiring gymnastics than sending it to VREF. Looking at other pedal schematics, I see plenty of examples of both, so I think I'll be safe with a large cap.

I will probably increase the feedback resistor values on that second stage by an order of magnitude (keeping the same ratio), as recommended above.

Passaloutre

#19
Now that I've had my questions answered, a full disclosure: I am planning to mod a cheap Boss SD-1 to the Greer circuit above. A fool's errand I'm sure, but something I'm determined to try nonetheless. It's fun modding pedals, and I want to see if I can pull it off. I'm planning to keep the Boss switching and buffers, and just modify the overdrive circuit in between. Should be a good project for the holiday season.

I've attached the SD-1 schematic and my list of changes below. It's pretty major surgery, but I'd like to leave the board as unbuggered as possible, hence my interest in using a 0VDC reference for the feedback loop on the second stage. The connections are already there. I'm sure there are a few places I could have recalculated filters to keep some more of the existing components, but it seemed easier to just use all new values.



All part numbers refer to the SD-1 schematic, not the Greer schematic.

- Opamp replace with OPA2134
- C2 replace with 47n
- R4 replace with 430k
- Drive pot replace with A500k, tie lugs 2 and 3 together
- R5 replace with 5k6
- D4 replace with three series 1N914 (make sure polarity is correct), and add 100p in parallel with series string
- R6 replace with 3k3
- Add series 12k and 470n parallel with C3
- R7 replace with 5k6
- C4 replace with 10n
- Remove tone pot
- Jumper from point 8 to 11 on circuitboard
- C5 replace with 39k
- R8 replace with 1u
- Remove C6, no jumper
- R9 replace with 47k
- C7 replace with non-polarized 1u
- R10 replace with 3k3
- Add volume pot (A100k) lug 3 from point 9 on board, lug 1 to VREF point 1 on board, lug 2 to point 2 on board
- Add tone pot (A10k), tie lugs 2 and 3 together and to volume lug 3, add 220n from tone pot lug 1 to volume pot lug 1

- D3 replace with jumper
- R31 replace with jumper

- R18 replace with 4k7
- R19 replace with 5k6
- C11 replace with 22u
- C17 replace with 22u

Feel free to tell me how dumb this is.  :P