Hardware version - capacitor on VT input

Some time ago i mad 4 homebrew IoTaWatt units with 3 dedicated VT inputs.(channel 0/1/2)
On the 2 first units i did not place the 10uF capacitors on the VT inputs since i ran out and i was told that they weren’t really needed.

Last weekend I updated my units from a very old 2.03.x version to the latest git version (2.04.01) .
After browsing through the manual (to setup Influxdb and grafana) i noticed “hardware version”.
Mine reports 4.x in the log.
Going through the code i noticed that the capacitive shift is compensated (in iotaInputChannel.cpp). This is done only when it’s lower than version 5.

So i was wondering if i should disable this in the firmware?

A second thing i could not find is how to set the hardware version in EEprom. The only thing i could find was inside Setup.cpp, but this is marked “Ordinarily to be done in manufacturing”.(line 117 to 132)
As far as i can see in the logs, reading the EEprom does not give an error, but i guess nothing is in it since i used my own hardware?

If you don’t have capacitors in the AC reference circuit, it would be better if the firmware is not compensating for them. There are a number of ways to accomplish that, and these may not be all:

  • Initialize the EEprom to indicate version 5 circuitry.
  • Add a custom VT to the tables with a shift that is 1.71 lower (50Hz) and configure the no cap inputs to use it.
  • Disable the correction in the firmware.
  • Add capacitors and let it compensate.

I would recommend burning your EEproms to indicate V5 circuitry. You have already located the code:

// Initialize the EEprom for testing
// Ordinarily to be done in manufacturing.

// EEPROM.begin(EEsize);
// memcpy(EE->id, "IoTaWatt", 8);
// EE->EEversion = 0;
// EE->deviceMajorVersion = 5;
// EE->deviceMinorVersion = 0;
// EE->mfgDate = 0;
// EE->mfgLot = 0;
// EE->mfgBurden = 20;
// EE->mfgRefVolts = 2500;
// for(int i=0; i<EEsize; i++){
// EEPROM.write(i,EEbytes[i]);
// }
// EEPROM.end();

Remove the // comment prefix, build and load the firmware and let it boot up. The message log should now indicate V5. You can then revert the initialization code (or not). The EEprom is initialized to V5. If you subsequently auto-update or compile and load a newer version, it will recognize these as V5.

Note: There are other V5 parameters in there. If you have 24 ohm burden resistors, you shoud change that with the

EE->mfgBurden = 24;

Same with reference voltage. If you have other than 2.5V indicate the value in mV.

EE->mfgRefVolts = 2500;

Thanks for the good explanation!
I have 2 units with the caps on them and 2 without.
Flashing the EEprom will only change anything for channel0 (as far as i can see).
Changing it to v5 in the EEprom will solve this for the units without the caps.

However, for the units with the caps it does not compensate anymore for channel1 and 2 since the code checks for _channel == 0
So maybe changing the tables is better at the moment. (and when i do the next update i can remove the caps and flash the EEprom)

  • For the units without the caps on them: change the type of the VT on channel0 : 1.71 lower
  • For the units with the caps on them: change the type of the VT on channel1 and channel2: 1.71 higher

As you explained, previously the When i look in the tables i could not find the 1.71 difference:

  • version 02.03.21: {“model”:“Ideal 77DE-06-09(EU)”,“cal”:19.12,“phase”:2.20,“p50”:3.22},
  • version 02.01.01 : {“model”:“Ideal 77DE-06-09(EU)”,“cal”:19.12,“p50”:[1.48]},

Am i missing something here? (or was there a tweak at the numbers and is the difference 1.74 (3.22-1.48))

Assuming 1.71 i would need to change it to:

  • channel0 (no caps): -0.23 (is negative allowed?)
  • channel1 and 2 (caps): 3.19

Is this correct, or am i forgetting something?

C[quote=“promy, post:3, topic:1119”]
Am i missing something here? (or was there a tweak at the numbers and is the difference 1.74 (3.22-1.48))

Correct. When the V5 upgrade was made with frequency specific compensation (and current specific compensation for CTs), the shift component was removed from the table value and the 1.71 (50 Hz) was added to the channel zero net shift for pre-V5 units with the capacitor.

I had developed the previous net shift of 3.22 with a single sample that someone sent me. I now stock them and have tested several representative samples to arrive at the new sans-cap value, so the newer 1.71 I would consider more representative, but the 1.74 is still well within the typical variance. These things just are not that consistent. That said, I have found working papers in cartons from China that indicate each unit was tested for no-load and loaded voltage.

You are in a unique situation with home built units. V4 units with external adapters for additional VTs do not have capacitors. There were a few built and in use.

I would suggest that the simplest solution for you is to remove all of the caps, and zap all of the EEPROMs to V5. That eliminates all problems going forward.

:smiley: Yes, its kind of a special situation!
In the long run i think it’s the best option to remove the caps.
For now i’ll just update the table and put it on my todo list for the next weeks.
Thanks for even supporting the homebrew ones!