EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: ploutone on May 18, 2017, 05:48:30 pm

Title: A quenstion about sensing an AC voltage
Post by: ploutone on May 18, 2017, 05:48:30 pm


In a project I'm working on, I am designing a boost PFC, and for the controller (using a digital controller) I need to sens the input voltage, which is an ACvoltage and feed it to the ADC of the digital controller and do the necessary calculations.

My question is regarding a circuit that senses and scales down the input voltage so I can feed it to the controller.

I tried this circuit:
(https://i.stack.imgur.com/JtyRr.png)

Idealy the results will be as follows:
(https://i.stack.imgur.com/tT6KR.jpg)

And the output voltages are:

V1 = VN * R2/(R1+R2)

V2 = VL * R2/(R1+R2)

The problem is that I don't know the voltage of the phase VL and of the neutral VN in regard to the ground GND, so I don't know how to choose the right resistors R1 and R2 and secondly the input of the op amp IN+ can't have less than (-V)-0.1V = -0.1V, so I think it will burn out if V1 or V2 goes under -0.1V.

Should I be worried about these problems and how can I find solutions for them, and is there any circuit with similar behaviour that I can use.

Thank you.
Title: Re: A quenstion about sensing an AC voltage
Post by: IanB on May 18, 2017, 05:57:58 pm
Idealy the results will be as follows:

I do not think this is so.

Consider that ideally neutral will be at the same voltage as earth/ground, so VacN will be zero at all times.

This is the first problem. Many other problems follow.
Title: Re: A quenstion about sensing an AC voltage
Post by: ploutone on May 18, 2017, 06:09:18 pm

Consider that ideally neutral will be at the same voltage as earth/ground, so VacN will be zero at all times.


Thank you for your reply,
I think in the positive cycle, yes VacN will at 0 all times, but in the negative cycle it's VacL who will be zero.



This is the first problem. Many other problems follow.

Is there any better solution ?
Title: Re: A quenstion about sensing an AC voltage
Post by: jeroen79 on May 18, 2017, 06:26:16 pm
Quote
secondly the input of the op amp IN+ can't have less than (-V)-0.1V = -0.1V, so I think it will burn out if V1 or V2 goes under -0.1V.
You are now powering the opamps from 5V and Earth/Ground.
Instead the latter you should give it a negative supply. For example +5V and -5V.
That way the opamps' inputs and outputs will not be cut off below Ground.
Title: Re: A quenstion about sensing an AC voltage
Post by: IanB on May 18, 2017, 06:29:10 pm
I think in the positive cycle, yes VacN will at 0 all times, but in the negative cycle it's VacL who will be zero.

Why do you think this?

Do you have a multimeter? If so, set it to the AC volts range and measure between the neutral and earth/ground of your electrical supply. What voltage do you measure?
Title: Re: A quenstion about sensing an AC voltage
Post by: jeroen79 on May 18, 2017, 10:03:22 pm
I think in the positive cycle, yes VacN will at 0 all times, but in the negative cycle it's VacL who will be zero.

Why do you think this?

Do you have a multimeter? If so, set it to the AC volts range and measure between the neutral and earth/ground of your electrical supply. What voltage do you measure?
He is right.
The point is that these voltage are the outputs of an opamp buffer fed from +5V to Earth.
When the input voltage is below Earth the opamp will hit it's lower rail and output 0V.

A multimeter does not have this problem.

Where he is wrong is that the two voltages take turns being stuck at 0V.
Both the Neutral and the Line voltages have the same sign relative t Earth so VacL and Vac will be in phase.
Title: Re: A quenstion about sensing an AC voltage
Post by: IanB on May 18, 2017, 10:56:49 pm
I understand about the op amps cutting off negative voltages. This would be fine if it is a robust expectation and design for rectifying input voltages.

However, my point is that in an ideal scenario there is exactly zero volts between neutral and earth at all times. If you feed zero into an amplifier you will get zero out.
Title: Re: A quenstion about sensing an AC voltage
Post by: Zero999 on May 18, 2017, 11:04:03 pm
Is it possible it's not neutral but another phase? Could it be a split phase or across two phases of a three phase suppl?

Either way, this is a really bad idea. There's no isolation from the mains. It's asking for fire and electrocution!

Add a small transformer and measure the voltage across the secondary.
Title: Re: A quenstion about sensing an AC voltage
Post by: ploutone on May 19, 2017, 03:00:05 pm
Thank you very much everybody, I think I'm gonna use a transformator to sens the voltage, and for that I am choosing the voltage sensing transducer LV25-P

(http://i.imgur.com/dSrcrqE.png)

the ratio is 2.5*RM/(R1+R2)
Title: Re: A quenstion about sensing an AC voltage
Post by: Zero999 on May 19, 2017, 11:25:59 pm
Thank you very much everybody, I think I'm gonna use a transformator to sens the voltage, and for that I am choosing the voltage sensing transducer LV25-P

(http://i.imgur.com/dSrcrqE.png)

the ratio is 2.5*RM/(R1+R2)
Good idea. Going by the data sheet you'll need some power resistors to work with 250V, which is 2.5W as the current draw is 10mA. Always over rate the power resistor and keep it cool enough: even though the resistor may be able to handle being hot, the PCB won't.
Title: Re: A quenstion about sensing an AC voltage
Post by: Circlotron on May 21, 2017, 01:13:13 am
Why do you need to measure the AC voltage? Seeing the boost converter part runs off rectified DC voltage, why couldn't you measure this rectified DC which is referenced to the ground of the whole PFC circuit?
Title: Re: A quenstion about sensing an AC voltage
Post by: jbb on May 22, 2017, 05:52:01 am
Hi ploutone

The big question is about isolation and safety.

If you need the output signal to be safe (i.e. you want to plug it into a computer or oscilloscope or touch , you pretty much need isolation.  The LV-25 is good for that. Pay attention to clearances in your board design.

If you don't need the output to be isolated, I wouldn't recommend a LEM LV-25 for most applications.  There are 3 problems:it's expensive, it's slow (<10kHz BW) and it has accuracy problems as the large power resistors heat up.

What could be good is a differential amplifier (https://en.wikipedia.org/wiki/Differential_amplifier#Operational_amplifier_as_differential_amplifier).  This can detect the line voltage between L and N for you.  Note that you can also change the ground reference of the diff amp a bit.  For example, here's a possible scheme: