When using two CTs to monitor the two main phases, do I just sum their RMS current?

I am in Canada, with two 100 amp 120v phases going into my house.

I would like to measure my total house current using an Arduino Uno and Emonlib, and I will have it transmit the data to an ESP32 via serial (but the Uno has the better ADC so I will use it for the measuring).

This means using two CT clamps, one over each mains phase.

I have seen how to measure two different clamps using the provided example. But I am wondering if I am supposed to sum these values to get total house current consumption, or if there is some “phase trickery” that has to occur and I can’t simply sum them? AC electricity and phases confuses me.

EDIT: I have also gotten this working with an ADS1115 and a modified library, but I had read previously that the 860 samples per second isn’t enough for accurate measurement of non-uniform loads. And I have an electric car charger, that goes from constant-current to constant-voltage, so I’m assuming that would be a very big non-uniform load, and if there’s any error from not having enough samples, it will show up there.

But the Uno is low resolution, enough that 0 load doesn’t read 0, it can have an error of up to 30 watts.

My question is which error is larger, the error from the ADS1115’s low sampling rate, or the error from the Uno’s low resolution? I have a feeling you are going to say the ADS1115 is worse but I would like to be sure.

Welcome, Joe, to the OEM forum.

I’d agree with this - up to a point. You say you want to use emonLib? This takes discrete samples every 10 s (normally, but you can choose the interval) and each sample lasts (from memory) 200 ms. What this means is it might miss rapid changes in your use - like for example an induction hob switching on and off every few seconds. There’s also emonLibCM, the ‘CM’ stands for Continuous Monitoring’ and it does - it misses nothing, just like your supplier’s meter! With steady loads long-term, there’s little to choose between the two. If you have something that controls the power and switches rapidly, then I’d recommend emonLibCM.

No, you have one phase and it’s split and earthed (to me, grounded to you) in the middle. So the ‘A’ leg goes 120 V positive to earth on one half-cycle while the ‘B’ leg goes 120 V negative, so you have 240 V between them with the ‘A’ leg 240 V positive with respect to the ‘B’; then on the next half-cycle everything is reversed and the ‘A’ leg is 120 V negative and the ‘B’ is 120 V positive, and the ‘A’ leg is 240 V negative to the ‘B’.

Yes, this is all you need to do. The currents and powers from emonLib (either version) are averages over the reporting interval, so it’s fine to add them. If you try to add the currents in the hardware by wiring the two c.t’s in parallel, then you do need to get the relative phase relationship correct, otherwise they subtract rather than add :frowning_face: .

I can’t comment on the actual performance of the ADS1115, but at 860 sps with your faster 60 Hz supply, you have 7 samples per cycle - in theory you’d just about measure a 3rd harmonic component of the mains. If you have a nasty current wave like this, from a washing machine with a brushless d.c. motor on spin (from Phase measurement and correction in IoTaWatt - #17 by dBC) then expect no guarantee of accuracy whatsoever:

That’s meaningless without knowing the maximum power you can measure. The input circuitry in the first part of CT Sensors - Interfacing with an Arduino — OpenEnergyMonitor 0.0.1 documentation and Measuring AC Voltage with an AC to AC power adapter — OpenEnergyMonitor 0.0.1 documentation
leaves a lot to be desired and you are likely to see an improvement in performance if you adopt, for both voltage and current, the configuration used in the emonTx4 and emonPi2 lower down the respective pages.
Also, the physical layout of the components and the source of the 5 V supply can have a significant effect on the electrical noise picked up and measured, which manifests itself as a residual current indicated when there is none.

Hey thanks for your reply!

Thank you very much for the EmonLibCM recommendation, I had no idea of the limitations of the original EmonLib. So if I understand it correctly, the original EmonLib was self-limiting to save on battery power? I will be mains powered so I would much prefer to measure as much as possible, thank you!

Thank you for helping me understand the split phase.

Re: the 30w error, I used the wrong word, I meant 30w resolution. I got that from this page that says any load up to 30W might read 0 when measuring with a 10-bit ADC.

However having seen how incredibly slow the ADS1115 is (4 seconds between readings due to waiting for 1480 samples, 8 seconds when measuring two channels), as well as the hidden implications of poor accuracy, I am switching to my Uno despite the resolution issue, which means changing the burden resistor to a 33 ohm one.

One more question if you happen to know the answer - I didn’t have any 10uF capacitors lying around. All I have are either 1uF, or 220uF. I have been using the 220uF since it has even lower “reactance” and the instruction paper pressed the importance of this low reactance - is such a high capacitance going to affect my measurements? Maybe something like a lag or delay?

What is the maximum current you need to measure? I ask because 24 kW (the total with 100 A incoming cables - service entrance wires to you) is an awful lot of power. You can increase the sensitivity of your c.t’s by increasing the value of the burden resistor, with the caveat that you also increase the errors, particularly the phase error. It’s a matter of balancing one against the other, and I wouldn’t go too far.

I’m a Chartered Electrical Engineer and I’ve been in the profession and industry for 50 years, so there’s a chance I might. :wink:
The 1µF would be far too small to have a low enough reactance to adequately couple (later version of the input circuit) the burden output to the input of the ADC loaded by the bias resistors. The 220 µF is plenty big enough, but it will take a while to reach its stable operating point of 2.5 V d.c., so expect the readings to be wrong for the first few minutes (you could always ignore the readings from the sketch after voltage is applied to the Uno until it’s had time to stabilise). After then, all should be OK.
If you do the theory, it’s charging to 2.5 V via the two bias resistors in parallel, so if you have the highest value we recommend of 470 kΩ, the time constant is about 50 s, when it’s 63% of the way there. In 5 time constants (~4 mins), it’s within 2%, which isn’t likely to affect operation, because the library will be doing its best to follow it. 10 kΩ bias resistors suddenly become quite attractive. :laughing:

@moeburn

If you’ve got 100 Amp service, then one question that needs to be answered is how big is the transformer that feeds your house.

Even with 200 Amp service, the max continuously available current is typically 104 Amps.
And that’s only if the transformer (25 kVA in this example) is feeding one house, which
is usually not the case.

See US 200 Amp Service explained or Do I need a 200 Amp CT?
for an explanation of why you don’t actually have 100 Amps of continuously available current, and how to determine the rating of the transformer that feeds your house.

The term 100 Amp service confuses most folks because it means the weakest link in the
Service Entrance Wire, Meter Base, Meter, Main Breaker, Load Center (circuit breaker box) chain, is rated at 100 Amps. It’s not the continuously available current rating.

Thanks for your replies everyone! Very cool to be talking to a 50 year electrical engineering expert.

It’s all working great with EmonLib, haven’t made the switch to CM yet because I don’t have a volt meter hooked up yet I’m just assuming 120 while I test things out.

I got two 100 amp clamps even though I’m only on 100 amp service because I am going to upgrade to 200 amp service soon, since with my car charger everything adds up to just over 100 amps, but the electrician who installed it assured me it was “technically within the 83% rule”.

I have one interesting physics question - I stupidly left my CT clamps disconnected, and open. I had actually opened them up to remove the burden resistors (I got the 100A:1v type). I did see another black component in there so I assumed that was the TVS diode and that would mean I was safe to leave them disconnected and open.

Well they were mostly fine, until I plugged in my car charger and it started drawing 30A@240. The entire panel started buzzing and I could physically feel the main supply wires that the clamps were on vibrating. I was trying to figure out what the heck was going wrong when I realized the vibration was changing depending on how I oriented the clamps. I quickly shorted them both with an alligator clip, and the buzzing and vibrating all instantly vanished.

I thought installing CT clamps was a fairly non-invasive harmless thing to do to your electrical system, but that vibration has taught me otherwise. Granted it was because of my stupid mistake and me not reading-the-freaking-manual, but still. I thought the TVS diode would protect me here, I guess it only protects the GPIO inputs of the Arduino.

I can say that the clamps are fine and undamaged despite the likely 10,000+ volts I was generating without any burden resistors. After calibrating them with a Kill a Watt, their Calibration Factor in Emonlib works out to about 57.7, which is not far off from the 60.6 default for a 5v Uno with a 33 ohm burden resistor.

But what the heck happened there? How was my mains wire vibrating just from having a clamp around it? It might have been the main breaker that was buzzing, which was in turn vibrating the mains wire, but why, what’s the physics at work here?

Eventually I’m going to have to disconnect those clamps again to take this project off the breadboard and into a proper box - what’s the proper procedure here, just get an alligator clip on them to short them as quickly as possible after pulling them out of the breadboard?

I think you’d have heard a crack and smelled burning if the TVS diode had failed and the c.t. had flashed over. It’s still not a good idea to rely on the diode for your safety.

Reduce the load your house is drawing to the absolute minimum (ideally drop the main breaker), and then unplug and short the c.t. A pair of 3.5 mm sockets with a soldered short (all 3 tags) would be preferable.

Are you able to open the panel and access the c.t’s to open them up? If so, that will significantly reduce the magnetic flux in the core, hence the secondary current, before you do anything. But if I understand U.S. practice, you’re not allowed in there.

A c.t. works in a totally opposite way (most of the time) to the much more common voltage transformer. In the c.t., the flux in the core is almost completely controlled by the primary current, and in effect extracted again by the secondary winding to produce the secondary current. Or most of it is. What’s left is the magnetising flux for the core. If you remove the secondary current, all the primary flux becomes magnetising flux, the core completely saturates for almost the full half-cycle, and the flux rapidly switches to complete saturation in the opposite direction. The flux waveform comes very close to a square wave. Two things happen: magnetostriction means the core changes in size due to the magnetic flux inside it - this is why all transformers hum at twice the supply frequency - and the very rapid rate of change of flux at the zero crossings generates, or tries to generate, a very high voltage (the same as the ignition coil in a petrol engine).

This is what an open-circuit 100 A YHDC SCT-013-000 looks like when the voltage is just being clipped at 22 V by the diode. The red trace is the primary current of 18.3 A, the green is the output voltage.

image

Wow! That is absolutely fascinating, thank you for the detailed explanation, and now I know how to do this safely. I don’t know why I didn’t even think of just flipping the mains breaker, that would of course make them produce nothing while open. But since this only happened when the 30A car charger was on, I’ll do what you say and just lower the current to minimum and use the soldered 3.5mm sockets. Didn’t think of that either, alligator clips slip off too easily.

In the US, a homeowner is allowed to work on their own stuff, but he did say:

It’s the split supply that had me.

I am allowed up in the mains panel, that’s how I installed the CT clamps, I’d just rather not if I can avoid it since it’s got live terminals in there that I can’t shut off.

For AC voltage monitoring, I have an AC-AC transformer lying around but it only outputs 24VAC - is there any reason I can’t just divide that down to what the Arduino needs like your examples do with 9VAC adapters, or is it too high to be safe?

No - to both.

By the time it’s divided down to around 1.2 – 1.4 V rms for your Arduino (assuming it runs on 5 V) then there’s little to worry about, not that there’s much to worry about with 24 V anyway. Measure the output voltage (and the mains voltage at the time) before you calculate resistor values, because the no-load output is likely to be quite a bit more than 24 V. If it says 24 V on it, this will be at full load. You don’t want more than 1.6 V rms at your highest mains voltage, and don’t worry about resolution. I’d aim for about the same current flowing down the voltage divider chain, about 0.1 - 0.2 mA, so about 10 – 20 kΩ for the ‘bottom’ resistor, nothing is critical here, and this will put the ‘top’ resistor in the 100 – 270 kΩ area. Forget the power rating, it’s milliwatts. You’ll get the calibration correct in the software - the number is the voltage that would give you 1.0 V rms at the ADC input.

Hooray, thank you for all your help! I had actually gone out and bought a ZMPT101B module before I had seen all your warnings about it on this forum having a poorly designed/overly filtered circuit. I thought it looked a little too complex to just be a transformer. There’s a lot of Youtubers out there recommending it, that’s why I ended up with it.

But I dug through my old bin and found this 24VAC power adapter, glad to know I can use that instead, and it looks like it will be a lot safer for me to wire it since its a packaged wall wart, I don’t have to actually hook up any 120v wire like I would with a ZMPT101B module. Thanks again!

If you do it carefully, you can still use the ZMPT101B taken from the module - the emonVs has one or three inside it, and for the right way to do it, get the details from Github (where it’s called emonVoltageSense, not emonVs). It will be much more accurate, you’ll have a small known phase error instead of a potentially large and unknown one. If you want to use it, from a quick look at the data sheet, you’d get 0.8 V rms out of it, which would give you more than enough accuracy.

I’d be grateful if you could check the circuit and components of the module against a circuit diagram. I’ve only ever found one on the WWW, and that had an obvious mistake. It would be nice to know just what it is exactly. From the results people have reported, I think I’m right but it would be nice to confirm.

Here’s the wrong published circuit of the module - it needs another 10 kΩ from the NI (+) input of the first op-amp to +5 V to work (like the second has).
ZMPT101B module cct dgm

Note, in everybody’s opinion, the dangerous single resistor with up to 254 V across it (when used in the UK). What’s the betting that component isn’t rated to 400 V? We use a fistful of lower values in series - if one fails to a short, it’s not dangerous, nor if there’s a flash-over beneath it.

Yes! It appears I’m using a different module, and mine is marked “V3”, which is promising. The one posted in the previous thread has different markings on the bottom than mine does:

And unless I’m missing something obvious, my circuit has an R13, which your diagram does not, and the original poster’s linked module has called that resistor R12 in its place (next to the high voltage input terminals), so I’ve got an extra resistor somewhere.

Unfortunately the Amazon link I bought it from doesn’t have a schematic, and googling “AC_voltage_LM358_v3” doesn’t turn up anything at all. I can tell from the SMD markings that my resistors have different values than the ones marked on your schematic, but this board has traces on the top and bottom and possibly more layers in between, and tracing out a schematic for it is more work than I’m willing to commit. Here’s some links to hi-res photos of it from my cell phone if you’re interested:

I thought the issue was the op-amp itself introducing phase shift. And then the incorrect resistors on top of that. It sounds like if I wanted to use this board, I’d have to tap into a solder point before that op-amp and possibly modify some resistors. I’m more open to using it given that it’s already on a module board with nice convenient wire taps provided, if you think it’s that much better than the 24VAC adapter I have lying around. Especially if it has a known phase shift, since calibrating for phase-shift in the Arduino code sounds tricky.

Edit - attached pics to post. Moderator - BT