Power reading change to negative values

I just set up a TXShield on a 3Phase installation which connects serially to a Pi and then ships its data to emoncms.org. I initially started out with the first phase only and only added the other two today. I'm using the Shield_CT1234_3Phase_Voltage sketch and first had some trouble getting the power factor calibration ok, but finally got it all up and running. (I thought ... ;-) )

The readings for the third clamp jump between positive and negative values. There is however no power generating device connected. Can anyone explain me what might go wrong?

I already searched this forum and I know that the direction of the clamp can cause wrong values, but the changes on the graphs included pop up without intervention, so nothing is changed hardware or software wise when a 'polarity' jump occurs.

I also tried to connect the clamps on different inputs, more exactly, switched CT2 and CT3. Initially, both again report positive values, but the values on the 3rd input (now with the clamp originally connected to input 2) gradually decrease (measuring every 5 ") and eventually turn negative again after 30" or so. So it seems not be related to the measurements but to the input or software handling it.

Any pointers are highly appreciated. I don't have any in depth knowledge on power monitoring, but am eager to learn and understand!

BTW, the values I used for calibrations are as follows, PHASE2 and PHASE3 were adapted to get a PF of 1:

#define PHASE2 10                                 //  Number of samples delay for L2
#define PHASE3 16                                //  Number  of samples delay for L3, also size of array
//Calibration coefficients
//These need to be set in order to obtain accurate results
double Vcal = 246.5;//234.26;                            // Calibration constant for voltage input
double Ical1 = 60.39595;                            // Calibration constant for current transformer 1
double Ical2 = 59.2;                            // Calibration constant for current transformer 2
double Ical3 = 58.55;                            // Calibration constant for current transformer 3
double Ical4 = 60.60;                            // Calibration constant for current transformer 4

double Phasecal1 = 1.00;                         // Calibration constant for phase shift L1
double Phasecal2 = 0.01;                         // Calibration constant for phase shift L2
double Phasecal3 = 1.7;                         // Calibration constant for phase shift L3
double Phasecal4 = 1.00;                         // Calibration constant for phase shift CT 4

 

 

Robert Wall's picture

Re: Power reading change to negative values

I don't have a Shield (or Arduino to put it on!), so I can't check that sketch. 

But this sounds horribly like another recent bug, one that I'm still chasing, that showed up on a 3-phase sketch as I converted it to use the LP filter (as in emonLib). This one is a value in memory is being corrupted somehow, and appears as silly real power readings, hence silly power factors (30 - 40 ! ! !). I have yet to discover what, where and how; but just about any change to the sketch alters the behaviour, even if totally unrelated to the power calculations. I've convinced myself it's a pointer somewhere in a library that's picked up a wrong value - or itself been corrupted. Whether I'm right or not remains to be seen. This one went away (temporarily?) when I changed 'cycles' to an unsigned int in:
   void calcVI3Ph(int cycles, int timeout);

Robert Wall's picture

Re: Power reading change to negative values

See my post here: http://openenergymonitor.org/emon/node/10089#comment-27568
It could well be that you have exactly the same problem.

pdcleyn's picture

Re: Power reading change to negative values

Hi Robert,

Thanks a lot for your pointers. Didn't have time yet to look into it (will do so now), I only tried the unsigned int cycles but that resulted in all zero values on all readings. Probably, some other implicit conversions happen allong the way.

I'll keep you posted on my progress!

Lykke's picture

Re: Power reading change to negative values

Had a similar problem until I updated the setup for other reasons; at night at low load one phase would suddenly drop from e.g. 50 watt to -50 watt. Seemed to disappear when a high load was applied, e.g. putting the kettle on in the morning, after which the base load would go back to +50 watt. Maybe a small piece of info to your puzzle, good luck. 

pdcleyn's picture

Re: Power reading change to negative values

Not so much progress today. I compiled with the gcc tools and removed all Warnings on type mismatches. All readings on CT3 are now positive, but they already were even before I started, but on CT2 I now have fluctuating values. I already removed the static strings from the output before I started this thread, so the F() function would not help, but thinking of it now, I might just introduce it again and maybe some side effect occurs ... ???

I don't have big consumers on the 2nd phase, so I'll put a kettle on it tomorrow to see if I have the same effect as you had Lykke. What did you change to your setup which also changed your measurement output? Did you change your wiring your electric system or did you change your monitoring setup?

pdcleyn's picture

Re: Power reading change to negative values

Did a quick test with the F() and no result. Both CT2 and CT3 now return negative values, but this is unrelated to the introduction of F().

 

Robert Wall's picture

Re: Power reading change to negative values

Are you using a recent JeeLib? I have not checked what effect adding support for the RFM69CW has had on the size of JeeLib. Changes to a 3rd party library that increased its size have caused problems for us in the past.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.