Rectifying an unbalanced signal

Started by fryingpan, September 20, 2024, 05:07:25 PM

Previous topic - Next topic

fryingpan

I've never done this. How are you supposed to do it? The easy way is to use a phase splitter. The best way? (No opamps!).

ElectricDruid

In what sense do you mean "unbalanced"? Do you mean "not a differential signal", or "with different positive and negative peaks", or something else?

And why no op-amps? They might be the best way, which is what you wanted.

Thanks!

fryingpan

Quote from: ElectricDruid on September 20, 2024, 06:07:04 PMIn what sense do you mean "unbalanced"? Do you mean "not a differential signal", or "with different positive and negative peaks", or something else?

And why no op-amps? They might be the best way, which is what you wanted.

Thanks!
Because there's this stupid desire of mine to design something without using opamps. I know how you rectify a balanced signal (easy, you just connect the bridge rectifier to the two different taps of a transformer). But if you want to rectify a signal (say, for controlling a VCA or whatever in a compressor)...

ElectricDruid

Ok, I think I get it. It's a "normal" single-ended signal.

The trouble with any sort of diode-rectifier is that nothing happens until the level of the signal goes over the forward voltage of the diodes. That's crossover distortion, effectively.

You can minimise the effect by using diodes with the lowest forward voltage you can find. John Hollis' compressor does this with germanium diodes in a diode bridge, IIRC. Another way is to use a phase splitter to give you in-phase and out-of-phase versions of the signal, and then use simple halfwave rectifiers to deal with each bit in turn. This is the approach used in the Dynacomp/Ross.

Another way to overcome the forward voltage of the diodes is to put them in the feedback loop of some device or other, to make a circuit called the "precision rectifier". This uses the device gain to eliminate the forward voltage problem and gives accurate results down to a few mVs. The only trouble is that the device in question might be an op-amp...:icon_eek: :icon_lol:

As usual, there's a good page on ESP about this:
https://sound-au.com/appnotes/an001.htm

There's probably ten other ways that I've forgotten, but the commonest are probably the "two half-wave rectifiers" technique borrowed from the Dynacomp (although you don't have to implement it the same way), or some sort of diode bridge. Precision rectifiers are less common but do turn up.

R.G.

My standard warning about using the word "best" applies. "Best" has no real meaning until it's attached to the list of qualities you will measure to determine what "best" means. In this particular niche, it clearly means "uses no opamps", but there are other issues, too. Cheapest? Smallest? Fewest parts? Best accuracy (and measured as accurate ...how?) Widest/narrowest/most specific frequency response? Widest input size range? Smallest input voltage range coupled with a given accuracy?

But you already knew all that.  :)

I'd use a differential amplifier to make the opposing phases. It's still a phase splitter, but more accurate and wider range than a single common emitter stage with equal emitter and collector resistors. Add on a few current mirrors to get the currents reflected to a common level and direction, and you have your full wave rectification. But then, you've replicated a lot of the circuitry inside an OTA, but with poorer accuracy and matching.

The things you're fighting are the DC offset on either/both phases and the forward voltage of any diodes. The 0.5v and up make it a non-starter for signals of anything lower than a couple of volts. Germanium is better, but still non-zero. The classical pedals doing envelopes generally use a slight on-bias on a silicon junction to get rid of most of the forward voltage, but it's still tricky.

An approach that I've never seen anyone use in small signal stuff is to use a synchronous rectifier. You generate opposing phases, then use some kind of comparat... er, saturating differential amplifier  :) to enable switching between two signals with MOSFETs or JFETs to literally pick the half of the signal that is positive right ... NOW... JFETs do this, OK, but can only get down to maybe 50-200 ohms when on. MOSFETs can saturate to lower ohms when used as switches, and can be easier to drive. Effectively, you're using a circuit to turn on a much lower-drop FET instead of a diode. A MOSFET full wave bridge driven from a wildly amplified input signal to tell the bridge which way to switch could be done discretely, I think. The MOSFET "on" voltage can be down in the millivolts if you're careful.



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.

PRR

Quote from: fryingpan on September 20, 2024, 05:07:25 PMRectifying an unbalanced signal

You don't say "full wave" (or "both sides"). A lot of audio can be done single-side rectifier.

> There's probably ten other ways

In the old days, any good BOOK would have 10 ways to do anything. At least one unique to that author.

This is not the book I was thinking of, it's been fluffed-up with some goofy things, but still worth downloading.
https://www.technicalaudio.com/pdf/Burr-Brown/Burr-Brown_Applications_Handbook_1994_ocr.pdf
also:
https://www.worldradiohistory.com/BOOKSHELF-ARH/Technology/Technology-General/Handbook-of-Operational-Amplifier-Applications-Burr-Brown-1963.pdf
  • SUPPORTER

PRR

#6
Audio rectification is such a solved problem that you really should say "what-for?" Meter? AGC? Anti-clip? Pitch doubling? Important: instantaneous or peak-catching?

When relentlessly optimized, a discrete rectifier may be far simpler than chip-heads might think. Here is a NEVE program meter which meets the original BBC PPM specs fine. Bottom circuit:

The current at Q3 collector is fairly accurately the peak-held absolute value of the input. (The voltage is LOGged by the diode chain.)
  • SUPPORTER

fryingpan

It would be to control a FET as a variable resistor, similarly to what happens in the Bearhug compressor (which sounds nice, but has a tendency to distort transients somewhat). I was toying with the idea of using a bjt, or a pair, to do the same, but it's far too complicated.

amz-fx



No diodes needed.

regards, Jack

R.G.

Quote from: fryingpan on September 21, 2024, 04:47:38 AM[...]I was toying with the idea of using a bjt, or a pair, to do the same, but it's far too complicated.
OK, so "complexity" is part of the scoring equation in "best".
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.

ElectricDruid

#10
You could even do this with a OTA wired as a ring modulator/4 quadrant modulator. Feed the same signal to both the input and the modulation input (AKA "Frequency doubler", although that's only true strictly for sine waves).
Negative voltages at the input would get a negative gain, so finish up positive. Positive inputs get positive gain, so remain positive. Hey presto!

It might even make some sort of sense given there's two OTAs in a 13700. One could be used as a VCA for the volume control, and the other as a ring mod for the envelope detection. I don't remember ever having seen such a thing, but it's probably been done at least once!

fryingpan

Quote from: R.G. on September 21, 2024, 10:21:50 AM
Quote from: fryingpan on September 21, 2024, 04:47:38 AM[...]I was toying with the idea of using a bjt, or a pair, to do the same, but it's far too complicated.
OK, so "complexity" is part of the scoring equation in "best".
Well, I imagine that using a BJT as a variable resistor in the bypass emitter branch of a BJT amplifier (so that I would need only like 10kohm as a maximum resistance, when compressing) means at least using two (because BJTs don't like being reverse biased, but then again, it might not matter) and therefore placing each after a diode, but diodes are not ideal so you actually need to implement an ideal diode with an active circuit in the bypass branch. I mean, it could work but would it be worth the bother? The advantage of using a BJT over a FET lies in better parameter spread and possibly better linearity, and in the bypass branch, if maximum compression is set at 10dB (it's just for catching transients) you can reduce the voltage amplitude seen by the variable resistor with a series resistor, which would also linearize for temperature. In theory it makes sense.

PRR

Quote from: amz-fx on September 21, 2024, 08:46:08 AMNo diodes needed.

Yeah, that one IS cute, but OP asked "no opamps". Sometimes you can roll your own, but the Simplified plan of the AD823 shows part-numbers to Q72(!), so either a lot of building or a lot of super-simplification needed. Also semi-match JFETs have gone rare.
  • SUPPORTER

Rob Strand

#13
No all rectifiers circuit have the same characteristics.  For test instruments we want precision rectifiers where the diode drops are removed.  For a compressor you can use non precision recifiers where the diode drops define the threshold voltage - that give the opportunity to simply the circuits.

Where half wave circuits only ever look at one cycle polarity the are also voltage doubler type circuits which look at both polarities however they are not full wave as the output cap is only charged every cycle.

The no diodes full-wave rectifier goes back to the CA3130 datasheet/app notes,


A BJT version with a similar theme was published in Electronics design magazine (Aug 1997),
https://www.radiolocman.com/review/article.html?di=647409


As I recall it's fiddly to tweak, perhaps promising more than it delivers.

The most conceptually simple non-precision full wave rectifier would be something along the lines of Figure 4.

https://sound-au.com/project60.htm

An equivalent  BJT version isn't so simple when you consider output impedance and DC offset.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

ElectricDruid

Quote from: Rob Strand on September 21, 2024, 06:13:41 PM
As I recall it's fiddly to tweak, perhaps promising more than it delivers.

I'd say that's a fair summary!! This circuit turns up in the Crumar Bit synthesizers (01 and 99, IIRC), where it's used to turn a ramp wave into a triangle. It *is* pretty fussy about levels, but in an oscillator like that where you have fixed amplitude at least you only have to adjust it once!

Rob Strand

Quote from: ElectricDruid on September 22, 2024, 08:26:07 AMI'd say that's a fair summary!! This circuit turns up in the Crumar Bit synthesizers (01 and 99, IIRC), where it's used to turn a ramp wave into a triangle. It *is* pretty fussy about levels, but in an oscillator like that where you have fixed amplitude at least you only have to adjust it once!
Interesting.

I couldn't see the circuit on those models.  I was interested to see if the Crumar units had the circuit before or after 1997.   It seems like Crumar was 80's.  It's not the first time circuits have been  rediscovered.   Although I always suspected some published circuits were not original but lifted from elsewhere - at least it got them to wider audience.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

ElectricDruid

They'd be Pre-1997, for sure. They're late-era analog, but still late 80's not 90's.

Here's the circuit from the Bit01. This is the later Bit01. The earlier one used SSM2044 filters and was different in many ways. This synth used the CEM3328 filter, which was a later CEM, so that would put an "earliest possible" date on this schematic, since it can't have been designed before that chip was available.



The 4250 dual 4-bit counter has its outputs and an inverted copy of its clock signal added together to make a 5-bit staircase "ramp" waveform. Two counters makes two oscillators. The osc output then goes to the BC173C to provide the "budget FWRTM" and to a LM393 comparator to create a variable-width pulse wave. The three waveforms  (Ramp, Square/Pulse, Triangle) then go to switches before being added together for the filter and VCA (off the picture).

Rob Strand

Quote from: ElectricDruid on September 22, 2024, 04:33:34 PMThe 4250 dual 4-bit counter has its outputs and an inverted copy of its clock signal added together to make a 5-bit staircase "ramp" waveform. Two counters makes two oscillators. The osc output then goes to the BC173C to provide the "budget FWRTM" and to a LM393 comparator to create a variable-width pulse wave. The three waveforms  (Ramp, Square/Pulse, Triangle) then go to switches before being added together for the filter and VCA (off the picture).
Thanks.   Definitely a similar idea.  I suppose the Electronics Design does add the Rx part.   It probably helps but it was still rough and ready.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

PRR

Quote from: Rob Strand on September 21, 2024, 06:13:41 PMFor a compressor you can use non precision rectifiers where the diode drops define the threshold voltage - that give the opportunity to simply the circuits.

You can frequently just use comparator(s). You only want to know if the wave goes too high, nothing else. A FW rectifier may simplify control.

That one-transistor dingus was wildly anticipated (~1976) by PAiA's 4720A VCO. Base wave is a ramp. One transistor splits and flips to a triangle.
https://modularsynthesis.com/paia/4700/4720A/4720a.htm
  • SUPPORTER

fryingpan

So basically, either a dual opamp or a phase splitter into two diodes and possibly two buffers. The dual opamp does make sense (small footprint, simple operation) and it's not in the signal path anyway. (Not that it matters...).