AC Voltage and Current Measurement Circuit Design with Differential Amplifiers

Thread Starter

Helios300

Joined Jul 22, 2022
12
I am trying to finalize the AC voltage and current measurement circuit using a differential amplifier. I have designed two circuits for each. In the high side current measurement circuit 2 and voltage measurement circuit 2, I have connected multiple resistors in series to the inputs of the op-amp. However, in the high side current measurement circuit 1 and voltage measurement circuit 1, I have connected a single resistor to the inputs of the op-amp. I am planning to use 0603 package resistors. As I know that op-amps have very high input impedance, I used a single input resistor in circuit 1. I am confused about which circuit to follow for voltage and current measurement, respectively.

AC Sense Circuit-min
 

LowQCab

Joined Nov 6, 2012
3,456
AC Voltage will have to be Rectified.

It would be much safer to step-down the Voltage with a small Transformer.

High AC-Voltage on the same PCB with Low-Voltage Circuits is a very dangerous plan.
.
.
.
 

Ian0

Joined Aug 7, 2020
8,407
Is this mains voltage AC? What is your DC power supply? You probably need isolation, in which case you need a current transformer or a hall-effect device.
What do you mean by "High-side" in this context? It only makes sense for the high positive voltage of a DC supply.
 

Thread Starter

Helios300

Joined Jul 22, 2022
12
Hi there, It's AC 220V rms mains voltage. The power supply for the opamp is 3.3Vdc, I don't want to use a transformer, current transformer, or hall effect sensor as these are bit costly solutions. High-side sensing means the shunt resistor is connected to the mains and the load comes after the shunt resistor. I tested circuit 2 of voltage and current measurement and it worked. I doubt why I should consider using multiple resistors in series to the inputs of opamp as shown in circuit 2 rather than using a single equivalent resistor as shown in circuit 1?
 

Ian0

Joined Aug 7, 2020
8,407
3.3V is coming from the SMPS and powering microcontroller, opam
IS the power supply for the microcontroller have any parts that can be touched by the operator?
Does the microcontroller have any other input/output connections?
If the answer to either of those is "yes" then you must isolate the AC inputs - you have no choice.
 

Ian0

Joined Aug 7, 2020
8,407
And if it costs someone else their life, it costs you your freedom (life imprisonment for Gross Negligence Manslaughter)
 

Thread Starter

Helios300

Joined Jul 22, 2022
12
IS the power supply for the microcontroller have any parts that can be touched by the operator?
Does the microcontroller have any other input/output connections?
If the answer to either of those is "yes" then you must isolate the AC inputs - you have no choice.
No part is touched by anyone, apart from the opamp output to the ADC of microcontroller doesn't have any other input/ output connections. I tried low-side current sensing practically and it did work without any mishap. I am still learning, as we know opamp has very high input impedance (in the range of mega ohms) so I believe that there won't be any issue of isolation. Please correct me if I am wrong.
 

Ian0

Joined Aug 7, 2020
8,407
No part is touched by anyone, apart from the opamp output to the ADC of microcontroller doesn't have any other input/ output connections. I tried low-side current sensing practically and it did work without any mishap. I am still learning, as we know opamp has very high input impedance (in the range of mega ohms) so I believe that there won't be any issue of isolation. Please correct me if I am wrong.
If it has no external connections, what does it do?
 

MrChips

Joined Oct 2, 2009
29,246
No part is touched by anyone, apart from the opamp output to the ADC of microcontroller doesn't have any other input/ output connections. I tried low-side current sensing practically and it did work without any mishap. I am still learning, as we know opamp has very high input impedance (in the range of mega ohms) so I believe that there won't be any issue of isolation. Please correct me if I am wrong.
What happens when the very high input impedance breaks down?
I would design with proper galvanic isolation.
 

Thread Starter

Helios300

Joined Jul 22, 2022
12
What happens when the very high input impedance breaks down?
I would design with proper galvanic isolation.
Hi, Could you please explain the scenarios which could cause the input impedance to break down? And also I have seen a few energy-monitoring smart switches, and energy meters using a similar circuit (They have also used shunt resistors, and differential amplifiers for measurement).
 

Ian0

Joined Aug 7, 2020
8,407
Microcontroller sends readings wirelessly.
In that case, connect the power supply 0V to mains neutral, and sense current on the neutral side of the mains.
NOTHING may connect to earth.
No connections to the circuit may be touchable.
The circuit must withstand a 4kV test between itself and earth, with no breakdown of any insulation.

Use your original #2 voltage measurement circuit, and split R4 into two resistors of twice the value, one connected to PSU 0V and one to PSU 3.3V.
Use your original #1 current measurement circuit and do the same with its R4.
That will give you a sinewave centred on half-supply, which you should be able to sample and calculate its rms value.
 

Thread Starter

Helios300

Joined Jul 22, 2022
12
In that case, connect the power supply 0V to mains neutral, and sense current on the neutral side of the mains.
NOTHING may connect to earth.
No connections to the circuit may be touchable.
The circuit must withstand a 4kV test between itself and earth, with no breakdown of any insulation.

Use your original #2 voltage measurement circuit, and split R4 into two resistors of twice the value, one connected to PSU 0V and one to PSU 3.3V.
Use your original #1 current measurement circuit and do the same with its R4.
That will give you a sinewave centred on half-supply, which you should be able to sample and calculate its rms value.
Hi, What if I don't connect the power supply 0V to mains neutral and keep the sense current resistor on the live side of the mains (As I am intending to measure current at the high-side)?
 

Ian0

Joined Aug 7, 2020
8,407
Hi, What if I don't connect the power supply 0V to mains neutral and keep the sense current resistor on the live side of the mains (As I am intending to measure current at the high-side)?
It might work - it probably won't - it depends on what happens to the common mode voltage.
If you want to sense on the live side, connect PSU 0V to mains live.
 

Thread Starter

Helios300

Joined Jul 22, 2022
12
It might work - it probably won't - it depends on what happens to the common mode voltage.
If you want to sense on the live side, connect PSU 0V to mains live.
When I tried it on the low side sense, It did work. For the high side I will try it without connecting PSU 0V to mains live, If it fails then I will connect it. Apart from the shunt resistor, all the resistors I am planning to use are 0603 package smt. And particularly in the original #1 current measurement circuit As I am going to deal with the mains 220Vac. I am talking about safety, having multiple resistors in series to the input of the opamp or a single resistor to the input of the opamp safe? Also, having input resistors value larger (as gain of opamp can be maintained by varying the feedback resistor value according to Rf/Ri)?
 
Top