Reading from a CT Sensor pin affected by Seven Segment Displays switching on and off

First, I just want to focus on the screen shots (post #24) of the outputs of the 2 current transformers which show a 48 watt load (soldering iron).
Assuming:

  1. The current transformers are rated at 5A and balanced for a 5volt ADC
  2. That the mains voltage is 240 volts 50Hz?.

I would have expected to see an analogRead() range of around 40 units since the entire scale is 0 to 1023 with a 10bit ADC as on the Nano.
However, the TA12-100 screenshot show a range of much less than 1.
The ZMCT103C screenshot shows an analog range of about 3 although I guess you can change the amplification factor with the trim pot.
Anyway, both are very much less than expected.

Please post the code that was used to generate the traces in the screen shots.

How did you wire the raw TA12-100 current transformer ? Something must explain the very low readings. Anyway, as has already been pointed out, a DC bias is required.

On the other points:

In principle, the energy measurement is simply the area under the sine wave curve. The libraries attempt to approximate by taking a number of amplitude measurements within the wave. The result is the same if the wave is rectified as in the case of the ZMCT103C trace, however, it must be unsmoothed. If the number of samples per wave is large and the spurious spikes are narrow, these spikes become insignificant. However, unless you can be sure that current transformers are delivering reasonable output in proportion to the load, there is probably little point in experimenting with different libraries or, indeed, looking too closely at your code. But one thing I did notice is that you do not attempt to synchronise your sample collection rate with either the input sine wave or any other time base. It all just runs at loop speed.

The circular say, for example, may be switched on using the switch on its handle. It would not be very practical to tap the wires there. Or what did you mean ?