### Calibration procedure

Hello All: I have purchased an emonpi which i am running on a Raspberry Pi2. I downloaded the raspberry pi image emonSD-17Jun2015 and have had the system running off and on for about a week now. I have now reached the stage where i need to calibrate the CT's.

I built a sort of calibration bench with a 600/1200 watt radiant heater and a shunt in series with the neutral line. The shunt is a 20 amp/ 50 mv per amp. I used this to measure current and a fluke DMM to measure voltage. The test bench is the only load on this particular circuit.

I have an ordered an emonTx V3 and intend to use this calibration procedure on the four channels.

The results of this are:

emonpi node power 1 = 585 watts

measured power = 676.8 watts

emonpi node power 2 = 587 watts

measured power = 676.8

emonpi voltage = 105.1

measured voltage = 120.0

I am using a 9 volt AC 1000 ma power supply produced by global village communications to provide an AC signal.

If i divide the measured voltage by the emonpi voltage (120 / 105.1) i find that the emon pi is reading about 15 % to low.

I would like to increase the emonpi voltage by about 15%. There is a place that is detailed in the calibration procedure to put a new coefficient (const byte Vrms=   120) emonTxV3

Now, i have considerable experience in the repair and maintenance of electronics but i cant count backward in hex and the linux command line gives me skin trouble but i consider the emon system to be a valuable contribution to the management of energy and i am willing to learn linux, some, if i have to, i guess.

Which leads me to my problem. I need a procedure, using the raspberry pi2 running the image provided by OpenEnergyMonitor, to make changes to the various coefficients controlling the emonPi for the purposes of calibration.

Could i add software to the raspberry pi2 that would allow me to:

(1) stop the emonpi.

(2) edit the appropriate file with new coefficients

(3) re compile?

(4) restart emonpi so the new coefficients could take effect.

Best Regards,

Andy McIvor

### Re: Calibration procedure

The real problem is that there is no mechanism for the processor in the emon part to read coefficients out of a file in the Pi part. What you have to do is install the Arduino IDE (on the Pi or on another machine), open the .ino sketch file, edit the coefficient(s) in the sketch, compile it (turn on 'verbose' during compilation and it'll tell you where it put the compiled .hex file) and then load that compiled file via the Pi's serial interface into the ATMega 328. The details of the procedure are in the Wiki.

If it's only the values reported in emoncms that bother you, as an alternative you could tweak the multipliers (for node 5: "scales = ...") in the emonhub configuration file, and that's accessible via the browser. You'll need to do voltage and all the powers, because at that point the multiplication has been done and voltage and power are quite independent. If you need to correct the power factor compensation, I'm afraid there's no alternative but to recompile and reload.

### Re: Calibration procedure

Thank you Robert for your quick reply. Using the multipliers i am now displaying fairly accurate readings. 670 watts displayed versus 676 watts measured.

The editing of .ino files is beyond me at the moment but is ultimately where i want to end up.  Your direction is appreciated.

Best Regards: AndyMc

### Re: Calibration procedure

I think there's quite a bit in Resources -> Building Blocks about setting up the Arduino IDE and calibration of the emonTx and Shield, but you'll need a programmer from the Online Store if you don't have one. The emonPi (the emon bit) is slimmed down emonTx, but loading the sketch is not trivial as I explained above.

### Re: Calibration procedure

The programmer is ordered.

AndyMc