So removing or bypassing the op-amps would solve the issue of the 24 degree phase shift. I have to wonder what issue they were trying to solve by adding the op amp to begin with.
I am actually interested in trying to modify this ZMPT101B module so that the opamp is bypassed, I will have to see after comparing the schematic and the PCB if that is something i could accomplish, once I understand what it is that needs to be done to remove the opamp from the circuit. (I have a couple spares of this ZMPT101B module.)
Also I did find what you were talking about on the 3 phase sketch, phase 2 and phase 3 used the storedV variable array to offset the phase difference:
if( PHASE == 2 ) {
phaseShiftedV = storedV[(numberOfSamples-PHASE2-1)%PHASE3]
+ PHASECAL * (storedV[(numberOfSamples-PHASE2)%PHASE3] - storedV[(numberOfSamples-PHASE2-1)%PHASE3]);
}
else if( PHASE == 3) {
phaseShiftedV = storedV[(numberOfSamples+1)%PHASE3]
+ PHASECAL * (storedV[(numberOfSamples+2)%PHASE3] - storedV[(numberOfSamples+1)%PHASE3]);
}
else { // PHASE==1
phaseShiftedV = lastFilteredV
+ PHASECAL * (filteredV - lastFilteredV);
}
I am in the US where we have split-phase there are 2 Legs of 120V each (60Hz), but It looks like I could adjust the logic in the 3phase sketch to correct for the 24 degree difference.(also because im on 60Hz and not 50Hz it would not be a difference of 24 degree correct?)
I originally used an AC-AC adapter but the voltage values returned by the “voltagage_and_current” script were not at all stable, it would on most loops return a value close to correct +/- 10volts but occasionally spit out a value like 400volts etc, which is so far off the mark its ridiculous. That is the reason that I got the ZMPT101B to begin with. I am wondering what the normal amount of voltage variance is when using a decent AC-AC adapter to sense the voltage, with the ZMPT101B its very stable, with a voltage of 120v expected, nearly all results return +/- only 1 volt so within 119-121 volt, or if my voltage from mains power is currently 117v then 116-118v, etc.
I am trying to use whatever solution or product will return the most accurate voltage reading.
When calibrating my Arduino, I am comparing to what my P3 kill a watt is reading, it has voltage, current, watts, va, and power factor that can all be displayed.
Not completely understanding the function of the opamp after reading wikipedia, I found this useful: https://www.youtube.com/watch?v=7FYHt5XviKc
Edit: so after watching the youtube video, and looking at the diagram, I see two Opamps, and both have the output going back to the inverting input, this suggests its for buffering based on what I saw in the video, Im assuming to get a more stable value? I do see that the output of the opamp does not go directly back to the inverting input, it has 2 paths, one has a resistor, the other path has a capacitor. After watching the video im guessing the capacitor in the opamp circuit is to help with the noise. All of this is new to me, I dont normally tinker with electronics, I am a software programmer, but I have installed all the wiring in buildings including the panels and/or sub-panels. I also see that the resistor path has both 100k then 10k to ground, so im guessing that means a gain of 10fold?