We often have thunderstorms, so most of my equipment is plugged into UPS units. The only exception is my emonTX unit which sits behind a simple APC surge protector and, obviously, its CT clamps.
Back in November we had a thunderstorm and a nearby lightening strike interrupted the power supply. I imagine we also received a surge just before the lights went out. The ups units stood their ground, as usual. But following the strike the emonTX started sending inverted data to my emonGLCD unit and to my emon cms account via the berry.
At first I thought that the TX's sketch may have gotten zapped, so I started sniffing around in it with the UART programmer. Then I gave up and learnt to live with all the inverted readings: solar panel production values were subtracted from whatever the house needed, which were being displayed as negative values, and we were "always" feeding into the grid, day or night, sunny and cloudy.
Today i I gave it another shot and solved it by simply switching the CT plugs round and reversing the direction of the clamps on our solar PV and main grid-in cables.
is it possible that following the lightening strike back in November that a sudden nanosecond surge may have inverted the polarities (juju) in the clamps? If so, is there anything I can do to protect them from future thundery events?
Re: Could the CT clamps have reversed polarity after thunderstorm?
What do you mean by juju? And by "switching the CT plugs round"?
I think it's most unlikely that anything like that could have happened to the CT. Had it had an iron core, I could have believed it had become permanently magnetised and that would result in totally erroneous readings, but as the core is ferrite, as far as I know it's not possible to permanently magnetise that. Is all the calibration still correct? - I presume so as you've not mentioned it. The power direction is determined by the relative phase of voltage and current, flipping the CT is one way to do it, you could do the same with the ac-ac adapter if that's possible (if either the mains side or the LV side is reversible). After the voltage and current have become power as a number in the sketch, it's all in software and I can't think of a mechanism other than memory bits being changed or programs/sketches being reloaded that would account for negation as you describe.
I presume you have copy of the sketch that you loaded. If you reload that and everything reverses again, it demonstrates that the sketch did get corrupted, but I find it incredible that it could just reverse a sign or two and have no other effect. The fact that the sketch runs is, I would say, conclusive proof that it's not been corrupted.
Re: Could the CT clamps have reversed polarity after thunderstorm?
Hi Robert,
Thanks for the reply. By juju I was referring to an unfathomable, superstitious occurance that I couldn't explain. It was meant to be humourous. And by "switching plugs" I meant switching the two CT jacks that plug into the emonTX. Regarding the CT jack switching, I reckon that back in November when I first tried stabbing around to fix the problem I had switched them, and then left them in a reversed position.
The calibration is still correct. I never really got round to fine tuning the system (it's off by about 11%), but the readings are now similar to what they were prior to the event.
I hadn't thought of flipping the ac-ac adapter. That could indeed work as I use a European two pronged adapter.
Regarding the emonTX v3's sketch, I never reloaded it. So it's still got the one that was originally loaded when it was first supplied – which may well be corrupted. I tried looking for the sketch in the wiki but failed. Could you provide a link?
Again, thank you for your help.
Seb
Re: Could the CT clamps have reversed polarity after thunderstorm?
Github is the place to look, but its the URL that is on the Wiki, under "Arduino Firmware Info" - it's the "...DiscreteSampling" one for whichever version of the V3 you have ("V3" = V3.2 on the PCB, with the RFμ328 processor module, the V3.4 has the processor surface-mounted direct onto the main PCB and DIP switches) and don't get the wrong one, else the radio department won't work.
So what you did with the CTs was you exchanged grid infeed and PV? Our convention is PV generation and Grid import are both positive, so as you hadn't changed the sketch, swapping them would have no effect. But if you had changed the sketch, or you'd edited the GLCD sketch to change the sign of one of the powers, that would explain it.
Otherwise the obvious question - did the ac adapter get unplugged in the aftermath and replaced the other way round?
Re: Could the CT clamps have reversed polarity after thunderstorm?
Thanks for the github heads up. No I never managed to upload the sketch.
Re the CT switching to fix the issue... no I didn't switch the CT's feed-in cable with the CT solar PV – I had attempted this initially but it didn't give me the correct results so I reverted back to their original order. Instead, I unclamped the CT's from their relative cables and flipped them round so that the cable running through each of them instead of going left to right, went right to left.
Re your last observation, maybe that was indeed the case. I'm now doubting my recollection of the event. But what I may have done was preemptively disconnect all my sensitive devices, as opposed to sit out the storm with everything plugged in and pray. I remember it being a pretty impressive thunderstorm, I could hear and see it approaching and ran into the house to unplug everything.
I'll do some testing later: reverse the direction of the CT clamps back to their original state, and then try replugging the adapter flipping it round.
Thanks again.