Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - jokunen

#1
I now created version 2 of the compressor.
This time I dropped the JFET input as this kind of pedal is used for live rather than recording and the sound difference is marginal.
Instead I upgraded the virtual ground to be able to sink/source some current and the envelope detector to use a full wave rectifier.
The gain reduction is now moved to the feedback loop of the gain op amp although I think it introduces some distortion. Theoretically it should have the same effect as shunting the signal to ground but somehow I feel that in practice it's not...
The LDR LED is not current controlled instead of voltage controlled which was made possible by the enhanced virtual ground.
It's bit more difficult to maximize the attainable gain with 9V rails with this device but I think I can get pretty close to line level.
I also tried using the 7660 voltage doubler but had trouble getting rid of the noise it generated on a tight vero layout. Possibly chokes on the rails would have helped but I didn't have any at hand.
#2
I guess my 5532 was broken because it induced a 100mv offset in the buffer side of the chip and that ate the headroom big time.
Maybe a coupling cap would be a good idea between the stages there.
Another headroom eater was my LDR. It seem to go really high resistance when the led is off so the buffer stage lost it's "4.5V" bias. I fixed that by adding a 1M resistor in parallel with the LDR.
I worked fine with a TL082 and now I put a OPA2134 in there to be on the "hifi" side.
The 2134 also has quite low standby current draw. I guess a good amp for the side chain would be the TL062 because of the low current draw.
The 9V rails are not an issue anymore. It seems to drive line level input into clipping before audible clipping from the preamp.
Of course adding a little compression makes it even easier not to clip.

I changed the LED driver to 2N7000 enhancement mode MOSFET and took out the red led from the source bias circuit. That seems to work better.

The first JFET bias changing with lower battery seems to be only remaining problem but I think I can live with that if the other option is adding voltage regulation for it. That would also waste battery power.
I still need to check the total current draw and maybe adjust some parts if it draws too much.

From usability perspective there are many styles of compression available. One special is saturating the compression led with "too low" threshold so the led is on all the time.
For actual live use there are too many interacting controls and the adjustment range is not optimal.
The threshold goes too low and too high with the MOSFET. That should be an easy fix.
The controls are too interactive. Gain, Threshold and Ratio all control the level of compression in the other 2 are in somewhat normal positions. I'll remove at least one of them when I find which settings are actually good.
It's nice to have all those extreme settings available but it makes practical adjustments more difficult.
It seems like fixing the gain at 25K and threshold at around 4.5V would make a nice straight-forward one-knob compressor but  there are other tempting options too.
#3
You are right. This device is not well engineered.
I agree FETs in general are not a good match for battery powered circuits because the usually large Vth eats so big portion of the rails. However J201 should be fine as such if I can get the rails stabilized for that right?

I will re-engineer the led driver circuit. I'm thinking about adding ratio control there and then omitting the "compression" control as it actually has quite limited adjustment range in this configuration.

I now used the device in actual bass playing. It sounds nice and provides quite much the kind of compression I was looking for that is transparent.
The 9V rails is a major problem and I was just about to ditch the whole thing and start again with +-15 rails but the small size and lack of power wire keeps me trying harder.
Currently going from very little compression to very audible compression requires adjusting at least "compression" and "gain" and in most cases fine tuning the threshold too to get the max ratio out of it with max signal level.
Adjustable ratio should make this easier as I could get more compression out of less gain.
It should also eliminate the need of hand-picking the LED driver FET. I'm planning to use 2N7000 this time. That has Vth around -1V so I can drive the LED to full brightness with at around 1/3 of max signal and use the new ratio control to reduce that to suitable level.

#4
Now I solved the previous problems with battery voltage changing.
The new led drive with FET also made IC2B totally redundant so it can be omitted.
I my last idea for threshold adjustment would have made compression ratio to adjust with threshold.
This model should have threshold quite much independent.
The LED driver FET needs to hand picked and matched. The threshold voltage sets the compression ratio.
The integrator circuit can swing from "4.5V" to max opamp positive swing so the best Vth should be that exact voltage difference.
Maybe it would be better to make the ratio adjustable at that end too with a voltage divider and use a FET with lower Vth.
The extra red LED was needed in my case to bring the FET near cutoff with a good battery and threshold set to 0V.
It would have been much easier if I had a P-channel FET.

The gain knob is quite interactive with the compression knob. The idea is to set the gain according to bass output and battery level for clean sound and leave it there.
This thing can drive line level input past 0db on transients but that's just it with NE5532 max swing.

I also noticed my precious first stage JFET bias is totally dependent on battery level. Depleting battery approximates to adjusting drain trimpot. Fresh battery seemed to bring the drain closer to the rail. Meaning less headroom. I didn't expect that to happen.

Now as I have a gain pot I had to try some distortion sounds. To my surprise the distortion was not so horrible as hitting opamp rails would usually sound. There is some interaction with the compressor circuit as it's not just a peak detector but the cap load faster with square wave than sine wave with the same peak voltage.
With adjustable attack and release resistor someone could be able to make a novel distortion box out of it.
#5
Thank you very much for your analysis.

Actually my initial design had the LDR in the feedback loop.
I changed it because I didn't like the sound. Logically it should work the same way when calibrated correctly.
That way there needs to be fixed resistor parallel to the LDR to set the max gain and possibly series resistor to set the ratio.
I felt more "in control" with separate variable gain and fixed gain stages. But yes that idea definitely needs to be explored further.

The stuff that happen after the rectifier...
Again I was careful to separate the transistor from the peak detector to avoid calibration but you are right.
Maybe the correct solution would be a FET so the input impedance would be high.
The led circuit is a sudden flash of genious that does not really work after all.
The leds are one the emitter to set the emitter voltage close to the opamp output when peak detector is idle.
As a concept it's a major component-saver compared to the what compressor.
The problem is that threshold level depends on the battery level; emitter voltage is constant because it's set by the 2 leds. Base voltage at idle is set by the +4.5V.
Fresh battery makes the whole thing choke...
So there must be an adjustable threshold. I'll refine the design and try to omit the buffer.
I'm now thinking about replacing the release resistor with a pot parallel to the capacitor. The wiper would go to the gate of the LED driver FET.

I really like your last idea because of the cool engineering part.
If I keep the IC1A then there is no reason to eliminate IC2B because opamps come in pairs.
On the other hand I could try to make an automatic make-up gain out of it...

Other problem I found in real use due the circuit being battery powered:
Driving line level signal with 9V is quite marginal. When the battery goes low so goes to max clean gain out of IC1B.
With my bass and semi-depleted battery I get distortion when R9 = 33k with NE5532.
I need to have adjustable gain and also try an opamp that goes closer to rails.
#6
No I checked my breadboard and the release resistor was actually 100k, but something between 50 and 100 could actually work better for bass.
The "compression" pot was wired wrong in the schematic. It's supposed to be between output and 4.5V and the wiper going to detector input.
In my actual build I also replaced the ratio pot with 100k as there is too many controls for live use. If it's used a better way to wire it would be to connect the wiper to the LDR and the ends between input and output.

Automatic make-up gain would be nice but I don't really know how to do it. Dual-gang at R10 and another opamp in the end would work but requires calibrating.
Making R9 variable has an interesting effect of increasing gain and compression at the same time but it's not really the same thing.
Would work as a slap-solo booster foot switch but I don't do that many slap solos :)

#7
About the enclosure.
Belt pack is a good idea. I was going to make a stompbox. It could be build inside the bass as well but that would be pretty extreme.
It's battery operated just because I hate any extra cable. Especially wall warts.
Still I'm going to build mains powered version too with +-15 rails for the opamps.
#8
Thanks for the comments.

It's without trimpot only because I first put the JFET to a test circuit and then select R3 based on that.
I aim to have 6V on the drain. So I admit being one of them trimpotters  ;)

C5 gets chaged only from the positive side of the wave so there is always less attenuation for negative sides of the wave. That's the asymmetrical distortion I was speculating on.
Hard transient would be an extreme case.
This is visible in LTSpice simulation but in reality I don't know if it gets smeared in the led or LDR.
Anyway if R13 is set to 0 there is very audible distortion. I don't know if the reason is this.

The value of the release resistor R14 may be off. I need to check.
Anyway it's 50k+1k and 1uF so it's 51ms?

R13 and R14 were originally pots to control attack and release.
R13 controls attack time but also compression level. It's not much different than the "compression" pot when used with bass guitar so I left it at 1k.
R14 controls release time pretty well when R13 is much lower than R14.
For bass guitar use after experimentation I figured that most of the release needs to happen between any 2 played notes. The release time is selected to be high enough to smooth out natural amplitude oscillations from sustained notes and low enough to release between notes.
For any other instrument I would select differently.

#9
I designed and bread boarded a preamp/compressor for bass guitar.

The design goal was to create a battery-operated preamp that is able to drive line level power amp directly from a passive bass.
I feel that properly preamped bass driven into proper amplification has too much dynamic range.
If the speaker's low end response is not sufficient then there is a good amount of "natural compression" but that's not the sound I want. That's why I wanted active compression.

The compressor design is initially inherited from "what compressor" but I reduced the part count a lot and connected the gain reduction before the compression detector.
This makes the compressor more of a limiter. It's easier to adjust that way and never goes to "negative ratio" which I don't like with bass.
Half-wave rectification instead of full-wave (like in what compressor) may introduce some extra asymmetric distortion but I haven't found it objectionable at least yet.

I initially had an option to add gain to the compression loop making it even more of a limiter. Works nice when slapping but sounds too much like typical VCA-compressor with finger style playing.

All the component values on the schematic may not be correct because I drew it from memory.
I have actually used NE5532 and TL082 so far but that OPA happened to be handy in the Eagle library when drawing.

There are two gain stages:
The first is a basic JFET gain stage followed by BJT buffer.
The second is non-inverting buffer driving inverting gain stage on a single opamp chip.
I previously compared the sounds of the JFET stage to an opamp and came to the conclusion the JFET sounds a bit "better".

The compressor part is an independent add-on.
There are controls for ratio (R5) "compression" (R10) and master volume (R15).
I initially had attack, release and pre-gain too but they are not that useful.
R10 is not real threshold as in this design the compression led is always on, so threshold is -infinity.
The R10 adjusts the compression sound in very useful way.
There is no "make up gain" as that would make a positive compression feedback loop.

I currently have just a normal LDR attached to a yellow led installed.
The vactrol is there just for easier drawing again. I may try a vactrol in there but then the R5 needs to be selected accordingly.

Please feel free to contribute and fix my mistakes.