Precision full-wave rectifier - clamped rectified negative cycle

Thread Starter

Dritech

Joined Sep 21, 2011
828
Hi all,

I am experimenting with an enveloping circuit (precision full-wave rectifier) which I found here
When simulating this and increasing the input peak-to-peak to 4.5V (supply is 5V and the op amp has a rail-to-rail input output), I am getting a clamped rectifier negative cycle as evident from the snapshot below.
I tried various diodes, resistance values, op-amps, but this configuration is the best I can get.
Is there a way to prevent this from happening?

upload_2019-10-7_22-43-12.png
upload_2019-10-7_22-40-17.png
 

ronsimpson

Joined Oct 7, 2019
110
If U1:A has its output at 5V then after D1 the signal will be 4.4 volts max.
Try reducing the signal level a little and see if the clipping stops. (cut the signal in half)
 

crutschow

Joined Mar 14, 2008
23,310
To avoid the diode drop limiting the maximum output for the negative input peak, you could use a precision full-wave rectifier circuit without diodes, LTspice simulation below:

upload_2019-10-7_15-8-33.png
 
Last edited:

crutschow

Joined Mar 14, 2008
23,310
Here's another circuit that does uses a diode, but it doesn't affect the peak output voltage:

upload_2019-10-7_17-25-38.png

The circuit operation is a little unusual and works as follows:

Feedback through the diode (purple trace) allows U2 to keep U1's positive input (green trace) at (a virtual) ground potential for any negative going input , which causes U1 to act as a gain-of-1 inverter, giving a positive output (yellow trace).

The diode blocks U2 from having any affect on any positive going input.
The means both U1 inputs have the same signal, which converts U1 into a non-inverting follower, again giving a positive output.
 
Last edited:

Thread Starter

Dritech

Joined Sep 21, 2011
828
@crutschow , somehow circuit 1 is not operating correctly when simulated on Proteus (same components etc), but circuit 2 is working fine, thanks.
This rectifier will be followed by an variable enveloping circuit, which is shown below:

upload_2019-10-8_23-56-18.png

A problem which I am encountering is that them the peak-to-peak of the input signal exceeds approx 4V, the output is getting clamped (shown below). This should not e caused by the voltage drop on the diode, otherwise the drop will also appear at 3V p-to-p (also shown below)
The op-amp is a rail to rail input/output.
What can be causing this please?

Vcc = 5V, input p-to-p = 3V
upload_2019-10-8_23-53-5.png
Vcc = 5V, input p-to-p = 5V
upload_2019-10-8_23-52-19.png
 

crutschow

Joined Mar 14, 2008
23,310
Yes, it is the diode.
It's the same problem you had with your original circuit.
Below about 4.4v the diode is inside the feedback loop so you don't see its forward voltage.
But when the opamp output reaches 5v, the loop opens, so the maximum output is limited to about 4.4v.

You could reduce the drop by using a Schottky diode.

Edit: If all you want is the peak voltage then just use a peak detector.
You don't need the full-wave rectifier.

Below is the LTspice simulation of a peak hold circuit that uses a P-MOSFET to allow the output to go to the plus rail.

upload_2019-10-8_17-44-2.png
 
Last edited:

TeeKay6

Joined Apr 20, 2019
381
@crutschow , somehow circuit 1 is not operating correctly when simulated on Proteus (same components etc), but circuit 2 is working fine, thanks.
This rectifier will be followed by an variable enveloping circuit, which is shown below:

View attachment 187592

A problem which I am encountering is that them the peak-to-peak of the input signal exceeds approx 4V, the output is getting clamped (shown below). This should not e caused by the voltage drop on the diode, otherwise the drop will also appear at 3V p-to-p (also shown below)
The op-amp is a rail to rail input/output.
What can be causing this please?

Vcc = 5V, input p-to-p = 3V
View attachment 187591
Vcc = 5V, input p-to-p = 5V
View attachment 187590
@Dritech
Although it's not the issue you are asking about, I notice the configuration of RV1 and R1 as unusual. As shown, RV1's effective value will change little until its wiper nears the ground end of RV1 when the effect will become pronounced. This is not inherently wrong, but I ask whether this is what you intended?
 

Thread Starter

Dritech

Joined Sep 21, 2011
828
@TeeKay6 , you are correct, I should remove the wire shown below. R1 is used in series with the pot so that the output of the op-amp will never get short-circuited to ground.
upload_2019-10-11_9-48-24.png
@crutschow , I prefer to use a full rectifier, this way I will get a better enveloping representation of the signal. If i use an ideal diode IC (such as the LM66100DCKR) instead of the TMM8263 diode, will this work? To be honest, I never used or heard of these ideal diodes until now, so i'm not sure if there will work for this application.
 

Thread Starter

Dritech

Joined Sep 21, 2011
828
Hi again,

I found the circuit for an ideal diode (instead of the ready made IC). It seems to be working fine when replacing the passive diode with this circuit (shown below).
Since the enveloping circuit will be fed from an op-amp. will the 22uF capacitor of the enveloping circuit cause any issues?

upload_2019-10-11_17-42-41.png
 

Thread Starter

Dritech

Joined Sep 21, 2011
828
Now I included a voltage follower at the output of this circuit. Why is it that at certain positions of the potentiometer, I am getting the following errors?

upload_2019-10-11_18-0-39.png
 

crutschow

Joined Mar 14, 2008
23,310
I found the circuit for an ideal diode (instead of the ready made IC). It seems to be working fine when replacing the passive diode with this circuit (shown below).
That circuit only work properly if the op amp has both positive and negative supply voltages.
Do you have that in your system?

The circuit in post #6 works with only one supply.
will the 22uF capacitor of the enveloping circuit cause any issues?
Why do you think you need a 22μF capacitor there?
Why is it that at certain positions of the potentiometer, I am getting the following errors?
That's an unusual connection for a pot.
Normally it would be connected as below.

upload_2019-10-11_9-24-59.png
 

Thread Starter

Dritech

Joined Sep 21, 2011
828
@crutschow , but the pot as you connected will act as a voltage divider (i.e. changing the amplitude). I need to use the pot to tune the enveloping effect (i.e controlling the discharge rate of the capacitor).
Your circuit was modified to allow for this. The 2K is used to prevent short circuit to GND when the pot is fully down. Will this work in practice?

PS: what is the part of the circuit with the op-amp and the MOSTET actually called? I cannot find any similar circuits on the internet.

upload_2019-10-11_19-7-48.png
upload_2019-10-11_19-5-30.png
 

crutschow

Joined Mar 14, 2008
23,310
but the pot as you connected will act as a voltage divider (i.e. changing the amplitude). I need to use the pot to tune the enveloping effect (i.e controlling the discharge rate of the capacitor).
Okay, now your circuit makes sense.
I didn't understand that you wanted to change the time-constant. :oops:
Will this work in practice?
I see no reason that it shouldn't.
what is the part of the circuit with the op-amp and the MOSTET actually called?
It's basically a precision peak-detector with a MOSFET buffer acting as a diode instead of a simple diode.

Note that you should add the resistor and capacitor I have in my circuit for compensation, otherwise, the output can oscillate as the capacitor is charging.
I don't put parts in my circuits that are not needed.
If you look at the op amp output in your simulation, you should see that.
 
Last edited:

Thread Starter

Dritech

Joined Sep 21, 2011
828
@crutschow , for some reason, when including capacitor C2 and resistor R3, the simulation is not running. That is why I did not include these components.
When monitoring the output at different frequencies (5 to 500Hz - this will the the actual frequency range), I am not noticing any oscillations.
 

Thread Starter

Dritech

Joined Sep 21, 2011
828
Okay, I thought you were referring to the output of the circuit, but apparently you were referring to the output of the op amp.

The enveloping circuit was tested on its own (eliminating the rest of the circuit), with and without the resistor and the capacitor. Below is the difference. Are you referring to this when you mention oscillation?

Without:
upload_2019-10-12_11-16-36.png
With:
upload_2019-10-12_11-15-59.png
 

Thread Starter

Dritech

Joined Sep 21, 2011
828
So I tested the circuit again and noticed that the simulation is giving an error with the rectifier circuit.

The aim of this circuit is to do the following:

Input signal can be anything from 1Vp-p to 5Vp-p with an offset of 2.5V
1st stage of the circuit is used to rectify the signal using the 2.5V as reference
2nd stage is used to remove the offset of 2.5V and amplify the signal by 2
3rd stage is the enveloping circuit, followed by a voltage follower

With this circuit, I an getting the following errors:
upload_2019-10-12_13-5-14.png
upload_2019-10-12_12-56-41.png

When removing the full-wave rectifier stage from the circuit, these errors are not showing. I'm not quite understanding that is causing this, or if it is just a 'bug' with the simulator.

upload_2019-10-12_13-0-1.png

Below is the waveforms which I am getting with the above circuit
(blue = input, white = differential amplifier + gain of 2 output, green = output of the enveloping op amp, red = output of the enveloping circuit

upload_2019-10-12_12-59-37.png
 

crutschow

Joined Mar 14, 2008
23,310
Are you referring to this when you mention oscillation?
Yes.
When removing the full-wave rectifier stage from the circuit, these errors are not showing.
Does the full-wave rectifier simulate by itself?
or if it is just a 'bug' with the simulator.
Not a "bug", but problems with convergence are a common problem with a Spice simulator. I've had to fight it many times.

So you try changing some of the simulation parameters to see if that helps.
Try using the .uic option to prevent it from calculating the initial operating point.
Change the integration method from Trapezoidal to Gear in the simulation parameters.
Sometimes a slight change in one of the circuit component values can help.
 
Top