galvanicly isolated voltage measurment

Thread Starter

kramzar

Joined Mar 7, 2022
35
HI,

I am trying to design a V-meter for a comercial product, that can accuratly measure voltages between 180-250V.
Since this is high voltage we are working with, the standards require that it has to be galvanicly isolated from the low-voltage section of the circuit with at least 4kV isolation strenght. The target precision doesnt need to be amazing. Errors of +-2V would still be acceptable

The current design i am using looks something like this:

MEASURE.PNG

It works reasonably well and can measure with +-2V precision, but it eventualy likes to drift over a long period and screws up the measurment.

This is the working principle:

the ZMPT101B transformer reduces the +-250V AC signal to +-15V AC and isolates the mains voltage from the circuit

this then goes on to an opamp, that removes the negative voltage values and outputs the difference between 12V dc and +-15V AC signals.

This outputs is 0-3V output voltage, which then goes to an ESP32 for adc conversion and measurment.

0V here represents 200V while 3V represents 250V. This way the sensitivity translates to +1V at mains = +60mV at output

I assume that the issue is with the transformer, because it saturates when its output voltage exceeds 2V already. This causes it to output spikes instead of a smooth sinus signal, which is a lot harder to measure the peaks of.
transformer.PNG


I have not been able to find a reasonable replacement part that would not saturate at 15V output voltage. If anyone has any recomendations i would highly appreciate.

I would also be open to any other solutions for isolated mains voltage measurment that you might have. I would also like to avoid using any niche IC chips, since they usualy have problem with stock availability, and this is a comercial product.
 

Thread Starter

kramzar

Joined Mar 7, 2022
35
hi kram,
This is your posted in LTSpice.
E
View attachment 289959
Hi,

Yes its 50Hz mains. And i am using MCP6271 opamp.

I did the ltspice simulations myself and it appears the opamp realy doesnt work the way i intender. i just got lucky that the circuit somehow still detected voltage changes.

I will try to change the opamp circuit so that it works as a voltage subtractor
 

Thread Starter

kramzar

Joined Mar 7, 2022
35
I am looking for a voltage transformer with at at least 4kV isolation, that can handle 15V sin wave signal on primary side and mirror the same signal on the secondary side without saturation.
I have been looking at datasheets for a while, but i cant quite get the info out of them at what current it starts to saturate the coil.
Here is an example: https://eu.mouser.com/datasheet/2/447/P782-3071376.pdf

would a transformer like this work?

Any transformer with turn ratios of 1:1 to 1:10 would work as long as it doesnt saturate and can generate 15V output wave
So far I have tried the ZMPT107 transformer, but that one already saturates at 2V output

Note from a moderator: Please keep this in the existing thread rather than starting a new thread. People here already
understand your situation.
 
Last edited by a moderator:

ericgibbs

Joined Jan 29, 2010
18,849

Attachments

Last edited:

DickCappels

Joined Aug 21, 2008
10,180
There are transformers and there are transformers. Some of them get by with less steel than others and produce harmonic distortion. Keys to low harmonic distortion are low magnetizing current (unloaded primary current) and low resistance primary windings.
 

Ian0

Joined Aug 7, 2020
9,817
I don't think that the ZMPT101 really likes 15V across a winding.
I used it with a 1k load resistors and two 110k resistors (because a single 1206 resistor is only rated for 200V peak) on the primary to give an output of 1V rms from a 230V input. That gives a maximum input of 268V rms before it clips, which is good enough for a mains voltage that should not exceed 253V rms.
The output is referenced to 1.65V, then sampled at 1600 samples/second, DC offset removed, squared, IIR filtered and square-rooted to give the true RMS output.
No op-amp required.
Screenshot from 2023-03-18 11-02-15.png
 

Thread Starter

kramzar

Joined Mar 7, 2022
35
The ZMPT101B is a module with a transformer and additional circuitry.
Is that what you have?
hi,

I just have the transformer without the circuit (ZMPT107 is also an equivalent part)

As for the voltage subtractor, i meant the opamp circuit, which is supposed to offset the entire sine wave to - 12V and cut off negative voltages.
 

Thread Starter

kramzar

Joined Mar 7, 2022
35
I don't think that the ZMPT101 really likes 15V across a winding.
I used it with a 1k load resistors and two 110k resistors (because a single 1206 resistor is only rated for 200V peak) on the primary to give an output of 1V rms from a 230V input. That gives a maximum input of 268V rms before it clips, which is good enough for a mains voltage that should not exceed 253V rms.
The output is referenced to 1.65V, then sampled at 1600 samples/second, DC offset removed, squared, IIR filtered and square-rooted to give the true RMS output.
No op-amp required.
View attachment 290063
This exact circuit was my first attempt at this, but i found out that it is too sensitive to noise to be reliable.
When you convert 250V to a 3.3V signal thats a ration of 1/75. Meaning that if the voltage on the maisn changes by 1V, you will only see an output change by 13mV. That is very close to just the noise treshold, and any small anomaly or increase in temperature will ruin your measurments by at least 5V in the real world.

Thats why i added the opamp, because if you convert 0-250V to 0-15V you get 60mV sensitivity/V which is much better and has a higher margin for changes.

The only issue here is that the transformer cant handle these output voltages without saturating
 

Ian0

Joined Aug 7, 2020
9,817
This exact circuit was my first attempt at this, but i found out that it is too sensitive to noise to be reliable.
When you convert 250V to a 3.3V signal thats a ration of 1/75. Meaning that if the voltage on the maisn changes by 1V, you will only see an output change by 13mV. That is very close to just the noise treshold, and any small anomaly or increase in temperature will ruin your measurments by at least 5V in the real world.

Thats why i added the opamp, because if you convert 0-250V to 0-15V you get 60mV sensitivity/V which is much better and has a higher margin for changes.

The only issue here is that the transformer cant handle these output voltages without saturating
13mV noise threshold? In 100Hz bandwidth? That's an awful lot of noise! How do you get that figure? The ESP32 has a 12-bit ADC, that's 800uV per bit.
If you sample and filter then the resolution increases. With the method I described I can easily read to within a tenth of a volt on a 12-bit ADC.
 

Thread Starter

kramzar

Joined Mar 7, 2022
35
13mV noise threshold? In 100Hz bandwidth? That's an awful lot of noise! How do you get that figure? The ESP32 has a 12-bit ADC, that's 800uV per bit.
If you sample and filter then the resolution increases. With the method I described I can easily read to within a tenth of a volt on a 12-bit ADC.
Well i tried the exact circuit you mentioned and this was the result:

This was the output with a 7.5V input signal using a function generator and fairly short wires on a bread board.

The signal is far too noisy even with an ideal power source, and if i change the input signal by 1V, it is berely noticable and is within the noise range.


pico.PNG


In theory yes the esp32 can handle voltage readings as low as 0.8mV, but in reality i find that, like most other specs it is far worse then that even under ideal curcumstances.

It can only really measure reliably up to 3.1V, and even then it is very non-linear. I found out from experimenting with it that even using an ideal voltage source it can only reliably detect differences of about 10mV after sampling/filtering/avareging (using 11dB attenuation)


Combined with the noise that gets added to the PCB trace under higher temperature and with high currents running close to it, i do not think this is a feasable sollutin for a comericial product to use.
 

Ian0

Joined Aug 7, 2020
9,817
Looks like some high-frequency noise. Put 330nF across the 1k resistor to give a roll-off at 500Hz - that should be good enough as an antialiasing filter. Then digital filtering after the squaring should deal with any noise that is still remaining.
 

Thread Starter

kramzar

Joined Mar 7, 2022
35
Looks like some high-frequency noise. Put 330nF across the 1k resistor to give a roll-off at 500Hz - that should be good enough as an antialiasing filter. Then digital filtering after the squaring should deal with any noise that is still remaining.
I tried this solution, but did not notice any improvement in the noise clarity. Also this circuit is very prone to measurment-ruining changes if the resistor values or input voltages are even slightly different from the differences in components, which they usually are.



Capture.PNG
 
Top