Schematic review request- isolated voltage measurment

Thread Starter

alesk123

Joined Dec 7, 2023
5
Hello,

I am designing a low cost solution for measuring voltage on the mains 220V with a precision target of 0.1V.
My requirements are 4kVrms galvanic isolation between mains and the low voltage circuitry.
I am measuring the output signal using an esp32
The transformer should be small and cheep.
It must be able to handle transients/ voltage spikes
Measurment range should be within 190 and 250V AC 50Hz

This is the schematic i would like to get opinions about:

SCHEMATIC_VOLTAGE.png

The general working principal is this:
The input resistors limit the current down to a few mA, then i create a voltage devider 21:1 from 230V to 11V (safe)
The 11V then goes to the voltage comarator circuit which optputs the difference between 9V on the - pin and the 11V on the + pin. The output is 2 V
Any negative voltage on the + pin goes to GND and doesnt make it to the MCU pin.
The 3.3V power to the opamp also limits the optput signal to 3V, which is the maximum the MCU pin can handle.

I have already used the op amp stage sucessfully for measuring 0-15V input signal but that was with a big expensive transformer, now i would like to use something smaller like this part from Pulse electronics.

Is this a sound design? I am mostly concerned the transformer is too small and doesnt have good enough slew rate for this.
Or the resistors (which are SMD 1206 1%) are not wired correctly.
Any design tips?

I have also looked at isolated opamps solutions before, but the seperate power supply for them and the cost parts drive the cost of the circuit to 6€+, which i think is too much.

Thank you for your feedback
 

Ian0

Joined Aug 7, 2020
10,293
  1. The PH9184 is a small power transformer which works at 100kHz. What. makes you think it has enough voltage-time constant to work at 50Hz?
  2. You don’t have a voltage divider, you have a current limiting resistor.
  3. The non-inverting input of the op-amp won’t work biased at ground. The input signal goes below ground, and the output signal can’t, so the feedback won’t work.
  4. Op-amp really don’t like capacitive loads, especially as high as 100nF.
  5. Are you using 0.05% tolerance resistors? You won’t get 1 part in 2200 accuracy with 1% resistors.
  6. You certainly won’t get 1 part in 2200 accuracy with the ADC in the ESP32
I use this part, and their application circuit, but biased to half-supply.
Current out isn’t precisely equal to current in, but can be compensated for in the gain of the op-amp.
I think it is sufficiently repeatable.
 

ronsimpson

Joined Oct 7, 2019
3,263
The 1meg resistor will have about 100V across them. Check your resistor data sheet many cannot handle 100V.
Change 100k + 1meg to 470k + 470k to have only 55V/resistor.

That transformer can handle 266V/uS. or to say it differently 0.266V for 1mS. Not going to work for 60hz for multiple reasons.
 
Last edited:

Thread Starter

alesk123

Joined Dec 7, 2023
5
  1. The PH9184 is a small power transformer which works at 100kHz. What. makes you think it has enough voltage-time constant to work at 50Hz?
  2. You don’t have a voltage divider, you have a current limiting resistor.
  3. The non-inverting input of the op-amp won’t work biased at ground. The input signal goes below ground, and the output signal can’t, so the feedback won’t work.
  4. Op-amp really don’t like capacitive loads, especially as high as 100nF.
  5. Are you using 0.05% tolerance resistors? You won’t get 1 part in 2200 accuracy with 1% resistors.
  6. You certainly won’t get 1 part in 2200 accuracy with the ADC in the ESP32
I use this part, and their application circuit, but biased to half-supply.
Current out isn’t precisely equal to current in, but can be compensated for in the gain of the op-amp.
I think it is sufficiently repeatable.
Thank you for the great feedback.
I have used the ZMTP101L part before, but it found that it can not really handle more then like 5V on the output without going into saturation and distorting the sine wave. Do you maybe have a circuit that you have used with it sucessfully that you could share?
If you are reffering to the "direction of use" picture at the bottom, i havent had sucess with those at all. I am also concerned with the validity of this part when it comes to certification, since they dont have any english documents or certification that proves the 4kV galvanic isolation, other then the mention in chinese in the 1 page datasheet.
 

Ian0

Joined Aug 7, 2020
10,293
I have used the ZMTP101L part before, but it found that it can not really handle more then like 5V on the output without going into saturation and distorting the sine wave.
That is because it is intended to be current driven - that's why the datasheet says "2mA/2mA".
I used the circuit in the datasheet - with 2x100k in series for 230V AC and 4x100k in series for 400V phase-to-phase. It's best to use it at 1mA not 2mA.
I also used it with a 51Ω load resistor and a AD8418, but you also have to limit the voltage on the secondary. You get the best accuracy with the lowest load resistance, i.e. driving a virtual earth as in the datasheet.
It passes my 2.5kV flash test.
 

Thread Starter

alesk123

Joined Dec 7, 2023
5
That is because it is intended to be current driven - that's why the datasheet says "2mA/2mA".
I used the circuit in the datasheet - with 2x100k in series for 230V AC and 4x100k in series for 400V phase-to-phase. It's best to use it at 1mA not 2mA.
I also used it with a 51Ω load resistor and a AD8418, but you also have to limit the voltage on the secondary. You get the best accuracy with the lowest load resistance, i.e. driving a virtual earth as in the datasheet.
It passes my 2.5kV flash test.
OK, great info. I have revised the transformer schematic. This one should be about the same as the ZMPT101L part and have 1mA on both sides. Do you think this circuit would be able to provide a 12V sine wave at the output that i could connect to an opamp?

transformer_schematic.png
 

Attachments

Thread Starter

alesk123

Joined Dec 7, 2023
5
Now you have no isolation at all.
Yes i realisted my mistake just after i posted it, I have corrected the orientation and changed the seconadry resistors to 12kOhm. That way the output should be 12V 1mA AC. I also added a greatz to make sure the opamp doesnt go to negative on the pin. Would this schematic provide 0-12V on the + pin?new schematic.png?
 

Ian0

Joined Aug 7, 2020
10,293
That’s better.
Don’t lose track of your target accuracy of 1 part in 2200.
You will never achieve that with a bridge rectifier in circuit.
I also presume that you need true rms, otherwise what does your accuracy figure mean?
To do that you will have to measure both positive and negative parts of the waveform, and calculate a mean value of their squares, then take the square root.
 

Thread Starter

alesk123

Joined Dec 7, 2023
5
That’s better.
Don’t lose track of your target accuracy of 1 part in 2200.
You will never achieve that with a bridge rectifier in circuit.
I also presume that you need true rms, otherwise what does your accuracy figure mean?
To do that you will have to measure both positive and negative parts of the waveform, and calculate a mean value of their squares, then take the square root.
Why would the rectifier ruin the accuracy? Would it be better if i placed it before the transformer on the L and N mains line?

Its true that i am measuring RMS, which is why i put the greatz in, so i can measure the negative period as well.
I would be satisfied with 0.5V precision as well, but thats where the op amp stage comes in. I tried this out already and it worked before. It limits the measuring range to about 190-250V but that alows me to increase the accuracy significantly, since a change of 1V on the mains, means 47mV on output, which translates to about 5 steps on the ADC.
 
Top