Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to design a Precision Rectifier for this Signal Input?


Mar 23, 2024
Reaction score
Trophy points
Activity points
How to design a Precision Rectifier for this Signal Input?

The input voltage varies between 0 and 5V and it is alternating sine wave. The reference point is +2.5V.

I need the output to be Half-Wave or better Full-Wave rectified Precision voltage that is no loss and the output voltage should vary between 0V and 5V so that I can read the voltage using ADC.


  • Signal.PDF
    27.5 KB · Views: 72

I´ve done many industrial .. and very precision - projects where one neded to measure mains voltage.
I´ve never used a precision rectifier.

* Software is more precise than analog hardware (no gain drift, no offset drift, no leakage...)
* software is adjustable without the need for soldering
* the delay between input and output is way faster (which immensely improves stability of a regulation loop)
* it is way cheaper

How I do it: (When I´m not interested in DC)
(3 resistors, 2 capacitors)
input signal --> series R(1) -->series C(1) --> ADC_input
Also at ADCinput:
* Resistor(2) to ADC_VREF
* resistor (3) to GND
* capacitor(2) to GND
That´s it.

Software: sample the input, filter it, and usually I do the RMS calculation.

Usually I use precision high resolution ADCs. But out of curiosity I´ve just done it using Arduino Nano (ATMEGA328PB) with it´s built in 10 bit ADC.
* I have a variable autotransformer with built in voltmeter (0..230V AC) . And my first tests showed that the Arduino result compared to the voltmeter was rather unlinear especially at low voltages but also from low to high voltages. I couldn´t explain why, so I debugged my software.. without success.
Then I used my precision HP/Keysight true RMS voltmeter as reference.
It turned out that the max deviation was just 0.2V at input voltages from 0.5V to 230V RMS. (Hard to read because mains voltage fluctuates)
So my cheap solution works very well! (much better than the variable transformer built in voltmeter)

Again: A cheap microcontroller built in 10 bits ADC, 3 resistors and 2 capacitors gave an input voltage range of +/-350Vp.
So about 0.7V/LSB but gave an error of less than 0.35LSB!

I doubt you get it that precise and that linear even with huge effort of external analog circuitry.
And - by the way - it is a true RMS and thus even works with non sinusoidal (or way distorted sine) inputs.
..and my solution consumes about 1% of processing power of the Arduino Nano. (@ 10 display updates per second)
And it may be fast (depending on software) .. theoretically from 0 to 100% within one mains period.

Rectifier Circuit cannot be very precise due to drop voltage over diode. And this voltage is sensitive to temperature variations.
OpAmp has also drawback such as Off-set voltage etc.
If I were you, I'd use RMS Converter for precision measurements. Scale your voltage and apply and obtain very precise DC voltage.
Problem is that the expected rectifier functions hasn't been clearly specified. Possible options are

- rectified instantaneous value (abs function)
- averaged rectified value
- rms value

Except for the first case, filter time constants respectively acceptable ripple for 50 Hz input must be defined. For a circuit implementation, we also should know available supply voltage. Another question, has input voltage stable 2.5 V offset or do we need a high pass filter to strip the DC offset.
Depending on freq of sine and resolution one could oversample to
say ~ 16 bits with 20 bit DelSig, or 12 bits with SAR (good to 1 MSPS), code to
do the rectification, then out thru DAC. Chip in mind DAC only good to
12 bits however.

This can be done synch to signal or not. With adaptability to its period.

Of course there is significant latency involved with this approach, may or may not
matter to whatever it is you are doing.....

Traditional analog approaches :

Regards, Dana.
Last edited:

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to