Wednesday, February 1, 2023

Hard clipping problems

When testing the distortion circuit in the full FX module, I noticed that the bitcrusher output was affected by the distortion. Once the clipping started, I could see a similar small change in the bitcrusher.

After a lot of debugging, I've concluded that this is due to noise on the GND line. It looks like we're sinking enough current into the GND or something, to make it shift by more than +/-100mV


Green is GND at the distortion module in relation to GND at the Teensy. Red is bitcrusher output

The noise was even visible as far back as the waveshaper. 

I have tested a lot of stuff to see f I could fix it: caps in the signal path, bypass caps, buffered GND by using an op amp to get a separate 0V reference - that didn't work at all:

Purple is 0V at the op amp output, it is NOT a constant 0v...

I then tried inserting a 4.7uF cap and a 1k resistor in the path, after the main gain cell but before the hard clipping diodes. It removed most of the noise, we're left with about +/-5mV. However, the clipping is much more rounded and the max output is reduced from +/-6v to +/- 3.6 approx. I then realised that the 4.7uF cap isn't necessary.

I tried reducing the resistor, first to 560Ohm (+/- 12.5mV noise) and then 220hm (+/-28mV noise). It looks promising.

I now introduced the same 1k resistor in the soft clipping circuit (R8):

It is part of the feedback loop but it didn't really look like it affected the performance of the soft clipping. Not sure what is going on exactly.

I then tried using 4 instead of 2 diodes for hard clipping. This increased the output to +/-7.6V, but it isn't as hard clipped as before. I assume that I could compensate for this in the feedback amp but for now it is running at max.

Comparing the soft and hard clipping shows that they are quite similar, perhaps too similar:

Hard clipping with 560Ohm res and 2 diodes

Soft clipping with 1k res in feedback - the top and bottom is not as flat as the hard clipping

My next step is to simulate the new circuit. There are a few things to worry about such as the hard vs soft clipping, and more importantly that the 1k resistor feeds into a 12k and a 15k respectively, the division of current at this point is very dependent of the exact value of the resistors. 

Things to test: What happens if I tap the signal to the feedback amp BEFORE the 1k resistor? how exactly is the soft clipping affected by the 1k in its feedback? How different are the modes?

I am not extremely happy about this design, but maybe it is enough to save hard mode. The unpleasant truth is that without changes it simply cannot be used. 







No comments:

Post a Comment