Gated sputtery sound with op-amp distortion

Started by mark2, July 09, 2021, 02:55:01 PM

Previous topic - Next topic

mark2

When reduce the gain to its bottom 1/8th range or so, I get a sputtery and gated sound.

What would be causing this?

VRef is 4.27V and Pin 3 of the LM358 is at about 3.96V so I tried reducing R3. This brought pin 3 up but it didn't change the sound.

If this is just inherent expected behavior, to workaround it do I just need to put a resistor in series with the gain pot to reduce its min gain?


edvard

C6 should go from the 4.5v point to ground.  Your 4.5v reference is likely drifting around depending on what the op-amp is doing.
All children left unattended will be given a mocha and a puppy

mark2

Thanks for the idea. I tried a 220u in parallel to R9 and I couldn't tell much if any difference. Seems like a solid idea regardless so I'll plan to add it.

antonis

What is the purpose of LEDs configuration and R25..??
"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..

mark2

#4
Quote from: antonis on July 09, 2021, 05:38:58 PM
What is the purpose of LEDs configuration and R25..??

The LEDs are just decorative indicators. The R5 was to reduce volume in lieu of a volume pot, but now I'm realizing I should have another resistor (e.g.  75k) from R5 to output as well, mimicking a pot as a proper voltage divider.

Edit: I fixed to refer to "R5", and cross out my momentary self doubt as affirmed by edvard below :)

edvard

Quote from: mark2 on July 09, 2021, 05:26:20 PM
Thanks for the idea. I tried a 220u in parallel to R9 and I couldn't tell much if any difference. Seems like a solid idea regardless so I'll plan to add it.

That's the only thing I can see with the circuit that looked out of place.  Maybe put a 1k resistor from the right side of your gain pot to output.  That way, with your gain control at minimum, the op-amp will never go below a gain of 1.  I know, non-inverting op-amps never go below 1 anyway, but it's good insurance in case your op-amp just doesn't like it for some reason.  On that note, have you tried subbing in different op-amps?  Is your battery fresh, or are you running from a power supply?

Quote from: mark2 on July 09, 2021, 06:10:44 PM
Quote from: antonis on July 09, 2021, 05:38:58 PM
What is the purpose of LEDs configuration and R25..??

The LEDs are just decorative indicators. The R25 was to reduce volume in lieu of a volume pot, but now I'm realizing I should have another resistor (e.g.  75k) from R25 to output as well, mimicking a pot as a proper voltage divider.

Yep, as it is, it's behaving like a 22k volume pot on maximum.  I didn't say anything as I thought you wanted it that way.
All children left unattended will be given a mocha and a puppy

mark2

Quote from: edvard on July 10, 2021, 12:30:49 AM

That's the only thing I can see with the circuit that looked out of place.  Maybe put a 1k resistor from the right side of your gain pot to output.  That way, with your gain control at minimum, the op-amp will never go below a gain of 1.  I know, non-inverting op-amps never go below 1 anyway, but it's good insurance in case your op-amp just doesn't like it for some reason.  On that note, have you tried subbing in different op-amps?  Is your battery fresh, or are you running from a power supply?

Ok, thanks for taking a look. I'll try the extra resistor to increase the pot's min value.

I haven't tried any other opamps. I may just out of curiosity if I have any with compatible pinouts, but to be honest I have a large stash of 358's from an abandoned project that I'm trying to unload, and this circuit was my excuse to use them. It's kits of this snowman xmas ornament if you're curious.

It's still very usable since it only affects the very bottom of the gain sweep, so worst case scenario I won't worry about it (especially since it's a novelty "pedal"), but in the meantime I'll keep thinking on it and tinkering. I suspect shifting the pot's range ought to work around it though.

edvard

Well looky here:
https://www.ti.com/lit/an/snoa662b/snoa662b.pdf
According to the Application Note, the LM358 is a single-supply op-amp.  The Data Sheet says it can run split-supply as well, but the upshot is that you don't HAVE to use the 4.5v reference.  That makes your design simpler, but I don't now if it has anything to do with the sound you're hearing.  Maybe give that a shot, see what happens.
All children left unattended will be given a mocha and a puppy

anotherjim


A test voltage that matters is at the output pin of the opamp. That should be very close to the reference voltage applied to the +input pin. However, your +input pins volts will read low due to the high resistance (1M) feeding it and the DMM input impedance will "load" it down but the output voltage shows what the input really gets.

A common cause of bad sound is a bad capacitor of which C4 would be the first to suspect. If that is leaky it will apply 0v to the -input pin causing the opamp to react by driving the output to a higher voltage and then it will clip. In that case, the DC voltage on the output pin will be higher than it should be.

If the feedback clipping diodes are good, the opamp shouldn't be clipping in normal use - no matter what the drive/gain control is doing. The distortion you hear should be the "squared-off" signal clipped* by the diodes added to the clean unamplified sound.
* not actually clipping, but "limiting" due to the gain dropping to x1 when a diode conducts.

A quirk of the LM358 as a single supply opamp is that its working range is not centred around 1/2 the supply voltage. It will ideally be (+supply - 1.5v)/2 or (9-1.5)/2 in this case. However, it shouldn't matter too much in this circuit.



Vivek

Quote from: edvard on July 09, 2021, 05:13:50 PM
C6 should go from the 4.5v point to ground.  Your 4.5v reference is likely drifting around depending on what the op-amp is doing.

While I agree that it is essential to have bypass caps on the Vref so that it is effectively a great AC ground,

I feel it is impossible for the Opamp to do anything that could make the Vref drift.

In the schematic that the OP posted, what do you feel that the Opamp could do that would make its Vref change ?

anotherjim

Where only one opamp circuit is using the Vref, it doesn't need an AC bypass cap there. A cap won't hurt though. An opamp can reject noise & ripple on the power supply feeds very well, but it won't reject it when fed to one of its inputs - because the inputs are telling it what to output. It's only if the exact same noise/ripple is fed equally to both +input and -input that it can be rejected (cancels).



mark2

Quote from: anotherjim on July 10, 2021, 05:18:45 AM
A common cause of bad sound is a bad capacitor of which C4 would be the first to suspect.

:icon_exclaim:  Sure enough, replacing C4 made a world of difference.

It's still gets a little bit of crackling at low gain, but it's barely noticeable.

Thanks everyone. I learned a lot and think this one is good to go.

edvard

Quote from: Vivek on July 10, 2021, 05:47:14 AM
Quote from: edvard on July 09, 2021, 05:13:50 PM
C6 should go from the 4.5v point to ground.  Your 4.5v reference is likely drifting around depending on what the op-amp is doing.

While I agree that it is essential to have bypass caps on the Vref so that it is effectively a great AC ground,

I feel it is impossible for the Opamp to do anything that could make the Vref drift.

In the schematic that the OP posted, what do you feel that the Opamp could do that would make its Vref change ?

Ya know, I'll admit I'm not entirely sure, but back in my early days of figuring out how to make coherent noise with a bunch of 2nd hand parts, I noticed one time that the 4.5v reference point I had ignorantly set up without a stabilizing cap was sometimes as high as ~7 volts and as low as ~3 volts.  This with a 9v power supply that actually measured at 9v.  It seemed like it would vary depending on how much and how long I had ran guitar signal through it.  Though I admit I probably shouldn't rule out other factors, the best I could figure is that without that cap in place, there were instabilities introduced into the op-amp's otherwise normal operation, which resulted in further instabilities, ad nauseum.  I'll admit I could be totally wrong; I'm not an engineer, but I couldn't explain it any other way.  Putting that cap in place cleared up everything, which seemed to further confirm my observations.
All children left unattended will be given a mocha and a puppy

m4268588


mark2

Thanks m4268588. Can you tell me a bit more about what that would do?

PRR

Quote from: edvard on July 10, 2021, 01:24:40 AM..... LM358 is a single-supply op-amp.  The Data Sheet says it can run split-supply as well, but the upshot is that you don't HAVE to use the 4.5v reference. ...

It is optimized to work very-very-near to zero, up to a few volts below the positive rail. In a car 12V system, zero to about ten volts.

It was targeted at cars. "Fuel Level" can be represented as 0V-10V. Air pressure, RPM, many things have simple single-way representations.

Audio swings BOTH ways. We need to preserve a concept of zero in the middle of the total range. We can't have the idle voltage dead-nuts ZERO and then swing negative from there. We can however set the idle voltage "mid-way" and swing both ways from there.

And you are right, the specialization of the '358 means "midway" can best be a little low of exact-half, though it rarely matters much.
  • SUPPORTER

m4268588

My English not good.


I don't know if it will solve your problem.

anotherjim

^ That is useful info, although I don't think the crossover distortion is extreme enough to cause complaint when distortion is expected anyway.  :)