What circuit should I be looking at to modulate 20mv-2v input to 1v?

Started by Thecomedian, June 27, 2013, 07:50:44 PM

Previous topic - Next topic

Thecomedian

I'm guessing it has to do with feedback, but I still haven't solved exactly what design is used to turn a 20mV-2V input into a 1V input. My idea is to have a voltage amp/de-amp stage prior to a specifically designed amp stage.

What calculations do I need to solve that? I suppose I'd want to figure out how to use negative feedback and a proper transistor type to have a gain of 5x to 0.5x?
If I can solve the problem for someone else, I've learned valuable skill and information that pays me back for helping someone else.

R.G.

You mean by turning a knob? Or automagically making all inputs between 20mV and 2V be 1V out?
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Thecomedian

automagic e.g. a transistor stage.

Should I be looking at differential amp stages? I want the user to have to do as little as possible to find the "good tone", the preamp/pedal automatically generating good tone for them.
If I can solve the problem for someone else, I've learned valuable skill and information that pays me back for helping someone else.

R.G.

You are asking for a constant-volume compressor. This is not a transistor stage nor a single opamp stage, and good ones are complex to design and make work well.

If you had been asking for a knob-adjusted one, there are single amplifier (transistor or opamp) that would do that.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

WaveshapeIllusions

You can do it pretty easily with a gain stage and some diodes to ground. :D

Of course that would probably result in undesirable clipping. I suggest using some kind of VCA. Those are usually quick enough to keep the voltage where you want it. I know a lot of FM demodulators use some kind of compression scheme to keep the signal at a consistant level. Try looking up a few of those.

R.G.

The problems with VCAs are often
(1) noise
(2) range
(3) how to generate the control voltage.

This last is the biggest problem in most envelope controlled things (which this is), and is really what underlies my original question. The circuit that determines the control voltage by rectifying/filtering or otherwise messing with the input or output signal is often more complicated than the VCA, especially if you have to do a good job.

FM demodulators often do several stages of differential amplifiers for the well-defined clipping a differential stage gives. It's a clipping process, not a compression process. FM is immune to clipping the input signal, as it looks only at its frequency.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Thecomedian

I feel like the answer should be simpler.. like a transistor that switches the input signal from the x1.0+ amp to a x0.1 amp line. I've already had some experiences where a "badly" biased transistor can turn a 1V signal into a 20mV signal with no distortion...

The alternative would be a diff amp to amp anything under 1V up to 1V, and if it's too much, a gain pot could exist on the input to lower it down..
If I can solve the problem for someone else, I've learned valuable skill and information that pays me back for helping someone else.

gritz

We just had a thread about this - more specifically it was about how to squeeze a signal with a wide dynamic range so that it acted on a wide part of a distortion transfer curve without falling off either extremity. Companding was mentioned, but unfortunately a forum hiccup lost the thread.

It depends entirely on what you're trying to do.

Do you want some kind of automatic gain control that constantly acts in realtime to keep it's output level at ±2V over an input range of *100 (40dB)? How fast would you want it to make it's decisions? Would signal overshoot if it reacted too slowly be a problem? if it was then it's tricky. The shortcomings of guitar type compressors have already been mentioned and a task like that would be more suited to a professional "brickwall limiter" with an essentially infinite compression ratio and and "lookahead" (a short delay between the signal input and "volume control" that allows the signal detection circuitry to turn the volume down before the an input transient arrives at the control, rather than just after...)

Or do you want some thinger that polls the input, sets an appropriate volume and then leaves it alone unless the average input volume changes by a large degree? Easier, but there will still be bits that may bee too loud / quiet and depending on the source material the volume might jump all over the place. The trick is in being able to guess the future.

What is it that you're trying to do, anyway?

Thecomedian

having the right voltage to drive a transistor stage into smooth distortion.
If I can solve the problem for someone else, I've learned valuable skill and information that pays me back for helping someone else.

R.G.

Quote from: Thecomedian on June 27, 2013, 11:21:01 PM
I feel like the answer should be simpler.. like a transistor that switches the input signal from the x1.0+ amp to a x0.1 amp line. I've already had some experiences where a "badly" biased transistor can turn a 1V signal into a 20mV signal with no distortion...

The alternative would be a diff amp to amp anything under 1V up to 1V, and if it's too much, a gain pot could exist on the input to lower it down..
:)
Yes, I feel like the answer *should* be simpler, too. However, that's why I asked whether you wanted a circuit to do this without human intervention, or if turning a knob (which implies a human messing with it) would do. Compressing 40db of signal to a single level is not a trivial compression task if it's to be done without noticeable distortion.

If you can live with a gain changer that works in steps, then it's easier than for smooth compression to one level, but it still gets complicated to make the signal that tells it "switch up/down now" and make sure it doesn't get caught in little places that dithers back and forth between a couple of gain levels rapidly. That gets kind of ugly in most cases.

And as gritz says:
Quote from: gritz on June 27, 2013, 11:52:57 PM
It depends entirely on what you're trying to do.

Do you want some kind of automatic gain control that constantly acts in realtime to keep it's output level at ±2V over an input range of *100 (40dB)? How fast would you want it to make it's decisions? Would signal overshoot if it reacted too slowly be a problem? ...
Or do you want some thinger that polls the input, sets an appropriate volume and then leaves it alone unless the average input volume changes by a large degree? Easier, but there will still be bits that may bee too loud / quiet and depending on the source material the volume might jump all over the place. The trick is in being able to guess the future.

What is it that you're trying to do, anyway?
Which is another way of asking must this work without human intervention, or can a person tuning a knob do what's needed?

Reducing or enlarging a signal is simple. Making that gain/reduction factor track a time varying audio signal well enough to squeeze the volume variation out of it is hard. Doing that smoothly enough to make the human ear not notice funny artifacts is even harder. If you then want to UN-do it, it gets harder still. Mother Nature cares remarkably little about what we thing should happen. She has Her own ideas.

As gritz says, if you tell us what you're trying to do, maybe we can help.

So
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

R.G.

Quote from: Thecomedian on June 28, 2013, 12:39:26 AM
having the right voltage to drive a transistor stage into smooth distortion.
Ah.
OK, squeezing 40db of signal variation down to maybe 3db or less. I'm guessing this is to keep it in the smooth distortion region all the time, right? I'm guessing this is to be non- or mostly non-distorting so you can get only the smooth distortion from the transistor stage, or whatever clipper/distorter you're using.

I have to tell you, I chased that for a number of years and never came up with a good way other than the iterated distortion stages. That works, but accumulates distortion and noise along the way. I've seen a number of compressors before distortion stages, and they work OK-ish, but they haven't been great enough to take over the FX world.

I don't know any slam-dunk way to do what I think you want to do. You need a good, fast acting compressor to do it smoothly, and that means a good envelope detector. Maybe one of the THAT Corp dynamics engine ICs would help. But they are considerably more complex that the transistor stage you're using for distortion, and have special signal and power needs of their own. Maybe other compressors would help.

I wish you luck.

R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.