EmonTX Arduino Shield (v1) issues / old firmware?

I’ve just finished building an emonTX shield (v1) that I bought a number of years ago. I’ve flashed the Arduino with the “Shield_CT1234_Voltage” firmware over at https://github.com/openenergymonitor/emontx-shield
I’m replacing an emonTX, which has been working great for years, as I need an extra channel.

However, when I plug in the AC & 5V power supplies to calibrate the setup, the voltage measured is way too high (around 290V IIRC), while the digi-meter is measuring an actual 239V.
Something tells me I’m running the wrong firmware maybe? Looking at the schematics the board seems to have changed a little, with extra resistors maybe (but it was late last night when I was looking at this).

I double checked the build which seems correct. So I guess I’m after the V1 firmware to go with the V1 board (before the SMT/reversing too place)?

I’d advise simply calibrating the Shield, using the instructions in ‘Learn’. Learn→Electricity Monitoring→Current & Voltage→1. Calibration Procedure→Calibration Procedure

The component values for the Shield have indeed changed - the voltage divider is now 13 : 1 (it was 11 : 1), so the default calibration values have certainly changed too - and possibly you have the earlier Mascot a.c. adapter, which needs a different calibration constant to the Ideal adapter now in the shop?

Hi Robert,
That’s what I’ve been trying to do, but I’m must be missing something somewhere.

I vaguely remembered I had the Ideal PSU, but I’ve just gone and checked and it’s definitely the UK DB-06-09 (missing the 77 from the Calibration page if that makes a difference) which was bought from the OEM shop, so the voltage calibration value of 268.97 should be almost there?

However, voltage divider my v1 board has 100K & 10K resistors rather than the 120K & 10K on the SMT v3. So the 268.97 should be altered to compensate from this?

The value of the burden resistors are 33ohms on my v1, so the current calibration coefficient value of 60.6 should also be there or thereabouts.

Thanks for your patience.

Yes, that must be changed. The number is the mains voltage that would give 1 V at the ADC. The o/c voltage of your adapter is 11.6 V for 240 V in, the divider is 11:1, so 11 × 240 ÷ 11.6 = 227.59 ± 4% approx. (due to component tolerances).

I reckon your 290 V should have been 283.6 V for that calibration, so 2.2% high, and within specification. (The adapter alone contributes ± 3%.)

If you can, it would be worth checking the phase error, that’s if you’re worried about it.

The current department should be OK.

Hi Robert,

Yes, the 290V could well have been 283V, I’ll try the 227.59 value when I get home tonight.
With respect to the phase angle, I’m keen to do everything to make the result as accurate as possible.

The Calibration page on the wiki doesn’t describe this procedure too well. I assume it’s connecting a big resistive load, then a big reactive load and adjusting the 1.7 value so as the power reading for each are about the same?

I can’t find any reference to calibration in the Wiki, so I don’t know where else you might be looking.

Repeating my initial reply, the calibration procedure you should be following is in Learn. Learn→Electricity Monitoring→Current & Voltage→1. Calibration Procedure→Calibration Procedure

What is it that is not described too well?

Hi Robert,

That Calibration section is what I’m reading -

  1. If you are using the voltage input, with the load connected adjust the phase angle calibration 1.7 in lines like this
ct1.voltageTX(236.39, 1.7); (emonTx V2)

or

const float phase_shift = 1.7; (emonTx V3)

so that real power and apparent power read the same value (and power factor is as close to 1.00 as possible). Your meter is not needed for this.

The phase calibration coefficient should not normally go outside the range 0.0 – 2.0

The output from the Arduino only gives a single figure of the power output? The preceding text suggest using a kettle or a heater, with no mention of a reactive load. Hence my confusion/guesswork.

In other news, that 227.59 value was correct, adjusted by -2 the voltage from the Arduino is now spot on and follows the digi-meter as it wanders up & down.

If you can organise a purely reactive load that draws sufficient current (probably needing a multiple-turn primary winding for your c.t.), then the most accurate way would be to use that and adjust for zero real power. That’s not mentioned because few people would have a load like that lying around waiting to be used for this, but most people should be able to find a good approximation to a purely resistive load.

You can easily (temporarily) add the power factor printed to 3 or 4 digits - it’s available from emonLib, but it’s not used in the default sketch.

Serial.print(ct.powerFactor,3);

Robert,
Thanks for all your help. My old school welder could only get the power factor down to 16, but it allowed me to adjust the phase angle calibration a touch, so I’m happy I’ve now got it all calibrated as well as I can.
Now to play with my Powervault! :grin: