Intrigued by a recent post I’ve gathered some data on how self-calibration works on this device. As noted in that thread, the front-end of the shield sits at 230V - the GND of the IC is the Active of the grid, so great care is required if anyone else is planning to experiment. Here’s the relevant snippet from the shield’s schematic:
The only requirement for an mSure run is that the IC is powered. There’s no need for a voltage swing at the V inputs and there’s no need for a load to be drawing current, but it can (and typically does) work with both of those items present, so it’s pretty flexible. The only downside of an mSure run is that the device stops accumulating energy consumed during the run, so violates the measure-every-cycle rule.
Starting with the V channel, VAP and VAN are the differential inputs for the voltage “sensor” - a 1M/1k divider. VAMS is the mSure output signal used to calibrate the divider. When mSure is running, it injects a signal into the bottom of the divider, running the divider backwards, and compares that with the signal coming back through the differential inputs. The end result of an mSure run is a suggested fine-tune gain setting (from the default of x1) for the VAP/VAN input channel to compensate for variations in the divider resistors, but there are challenges.
The signal itself is a square wave with slow edges, moving between ~800mV and ~400mV. When you put 800mV into that divider backwards, you get back 799.992mV if the resistors are all perfectly precise. mSure is using what it gets back to determine the actual divider ratio so it’s working way down in the uVs to do that.
The second challenge is you need to complete the circuit for the injected VAMS signal. In the schematic above, the top of the divider is just floating at the Neutral pin of the meter. You could use a jumper to short the Neutral and Line-IN pins together to give mSure a very clean environment in which to measure, but more commonly you’ll have them connected to the grid. The grid resistance is infinitesimal compared to the 1M divider it’s in series with, so can be thought of as a jumper between Neutral and Line-IN with one important difference: the grid is now injecting its own signal into the top of the divider while mSure is injecting one in from the bottom.
Below are captures of the divider output during an mSure run with different V swings on the Neutral / Line-IN pins:
No AC swing (Neutral and Line-IN shorted together with a jumper)
26V AC swing at Neutral / Line-IN
120V AC swing at Neutral / Line-IN
230V AC swing at Neutral / Line-IN
To overcome those challenges, mSure does a lot of sampling for a long time. The results get pretty impressive after about 1 minute. If you haven’t turned it off after 10 minutes, it turns itself off. There are two registers you can poll throughout the run: the currently recommended gain adjustment and the confidence level in that recommendation. It’s up to the meter designer as to how often they run mSure, and whether they run it for a set time, or until a specified confidence level is achieved. For these experiments I let it run for a the full 10 minutes, but it mostly got about as good as it was going to get after 2 minutes.
The first step was to set the shield up with a “nominal calibration”, i.e. do all the maths involving the maximum input deflection, the nominal voltage divider and the maximum register counts. I then used that to measure a reference voltage of 230V from the calibrator. Even with just the nominal calibration, the results were impressive: it read the 230V as 230.577V, so was reading about 0.25% high. Then I let mSure run and it recommended a gain adjustment of x0.9982 which brings the reading down to 230.162V, so it had brought the error down from 0.25% to about 0.07%.
Below are plots of the mSure run at various input voltage swings. They don’t all land at the same place but each of them significantly improve the 0.25% error you get if you just stick with nominal.
I’ll post the I channel findings in a separate reply.