Precision Half Wave Amplifier for Arduino

Hello,

I need to sample the half wave of an AC signal, therefore I am looking for the ways which will give me precise results. I want to use precision amplifier but since I cant provide negative voltage from the Arduino to the op amp, it doesn’t work.

I tried to give positive voltage from the non-inverting input, it did work up to some value. However, because I feed it with +5 V, after some value, this method doesn’t work as well.

Could you give me idea about how I can cope with it ? Thank you.

precision.png

If this is just for testing, use two 9V batteries in series, with the center tap grounded, to provide +9 and -9V.

Be sure to add 100 nF decoupling capacitors across the op amp power and ground pins.

I tried to give positive voltage from the non-inverting input, it did work up to some value. However, because I feed it with +5 V, after some value, this method doesn't work as well.

If you're saying the output won't go up to 5V or down to 0V, that's normal. Depending on the op-amp you might "loose" 1V or so at "both ends", so it might have a linear range of 1-4V or something like that.

You can get a rail-to-rail op-amp, but I'm not sure if these will go exactly-down to zero or exactly-up to 5V, or if they just get very-close.

I've used a similar circuit with +/-12V power supplies and a [u]protection circuit[/u] for the Arduino. I generally build my own power supplies, but in one automotive application I used a DC-DC converter to get -12V.

If you only want to sample one (the positive) half wave, why bother with negative voltages?

Else what's the voltage range required at the amplifier output?

You also missed to specify "precision" in physical values.

If you just need a negative voltage with very little current then you can use a charge pump. You connect a spare output from the Arduino to the charge pump input then toggle the output H>L, L>H on each loop. There must be little or no delay in the loop for this to be reliable and this is only good for, maybe 5mA or maybe not even that. Not sure what value capacitors as it's ages since I've used one, maybe 0.1μF to 1.0μF, you will have to experiment, or maybe someone here will suggest better values. Any common small signal diode will do. Possibly wise to put 220 Ohm resistor in series with the Arduino output pin to protect it, although this will reduce the available current even more.

A charge pump can be connected to a PWM pin, set to a value of ~128.
Or a pin can be set to a much higher frequency in setup().

But why all of this.
OP mentions 'AC' without giving a frequency, and 'precision' without telling how much, and amplitude is left out.
The Arduino CAN measure negative voltages with only passive parts.
We need ALL the details, before any advice should be given.
Leo..

Full wave can be measured by applying a DC offset to bring the negative half of the wave into the positive. Amplitude can be reduced by a voltage divider. The two can be done in one go using a 3-resistor voltage divider. No OpAmp needed.

Wawa:
A charge pump can be connected to a PWM pin, set to a value of ~128.
Leo…

Damn! I should have realised that! :slight_smile: