Hi,

What is a normal accuracy you’d expect on a YHDC SCT-013-000?
Has anybody got a calibration curve from 0 - 3kW I could look at?

I have an Arduino Uno running the test code from the website: Learn | OpenEnergyMonitor

It’s setup with an 18ohm burden on the 3.3v line, running off laptop USB so power supply should be good & stable. I adjusted the RMS voltage to 240V instead of 230V as I’m in the UK and this is normal at my house.

But:
When testing with a hot air gun comparing the different settings to my home energy monitor I get a lot of discrepancy, like ~100% error below 2kW. Is this normal?

Real - Measured
0W = 150W (Seems odd that the zero crossing in the emon lib isn’t dealing with this?)
150W = 355W
400W = 780W
570W = 1017W
1115W = 1500W
2000W = 2000W (Gets more accurate at higher load, this 2kW is heat gun on full power)
2900W = 2900W (Kettle only)
4900W = 4800W (Kettle & full power hot air gun combined)

Questions:
If I’m using the Emon library I thought it would zero out much better than this to say 0-30W not 150W. I swear in one setup I was seeing this then it went back to 150W being is zero reading, no idea what changed.

Is there a port of the Emon library in python for use on a raspberry pi pico? Looks like they have high enough sample rate ADC converters now for this to work?

Tried:
-Definitely just clipped around 1 line wire, I made a special plug box to expose only this
-Cleaning my copper strip board with meths to remove flux that seemed to cause conduction issues
-The clip is definitely shut and well closed
-Testing on 5V instead of 3.3V (but didn’t change burden, no effect)
-Checked resistor values with multimeter, all good at 10kOmhs & 18Ohm burden
-Checked home voltage for the day at 242 Volts
-Calibrated using kettle known to draw 2.9kW via home energy monitor - increased current calibration from 111 to 118.169.
-Changing the sample number on calcIrms from 1480 to 5000 to 10000 - no visible change in error just smoother and more averaged readings.

The data sheet quotes ±3% linearity between 10% and 120% of rated current, i.e. between 10 A & 120 A.
In practice, it remains linear quite a long way below that. There’s a test report in ‘Learn’. However, no mention is made on the data sheet of phase error, and this is quite important when measuring real power.

That’s meaningless. The c.t. has no concept of either power or voltage. Only current is meaningful.

And what about the analogue signal conditioning on the front end? How have you constructed this?

If you think about it, 2 kW @ 240 V represents a current of just 8.33 A - 8.33% of full load for the c.t., and with an 18 Ω burden, that will give an input voltage to the ADC of 75 mV rms. Yours is a familiar complaint, and it’s common when the experimenter has built the analogue front end on stripboard or even worse, on plugboard. The problem appears to be noise and interference getting in either directly picked up from electric or magnetic fields in the vicinity, or via the power supply, and that’s evident from your table of results.

There’s also an inherent problem of noise in the calcIrms( ) software: The rms calculation involves squaring the values (of course!) but in the process you also lose the sign. This means that and random noise is rectified along with the wanted signal and gets added to it - and this largely explains your “zero” reading of 150 W.

A further problem you will surely come across is that by using the nominal rms supply voltage and rms current, you are not calculating power (otherwise called real power or active power) but volt-amperes: apparent power. This will give you errors when you measure something that has a reactive component - a fridge or freezer with an induction motor, for example.

If you add a voltage transformer and measure the voltage, and then use calcVI( ), it will give you a definite improvement, because the random noise is no longer rectified and tends to cancel out.

Zero crossing detection can only work with a voltage present.

If you do add voltage measurement, you’ll soon see that you meant “at that minute” - not for the day.

Not that I’m aware of.

One circuit modification you could look at is to change the c.t (and v.t if you are going to use one) input configuration from what you see in the ‘Learn’ pages to the configuration we now use in the emonTx V4, but keeping your burden resistor in place (i.e. the same arrangement as almost every audio amplifier, where one side of the input is solidly grounded, and the input capacitively coupled to the ADC input, with the bias voltage applied there).

Also if practical, you can use a multi-turn primary winding for your c.t. You then adjust the calibration coefficient accordingly - so for say 12 turns, your 8.333 A becomes 100 ampere-turns (this what the c.t sees) and you divide your 118.196 by 12 to get the new calibration. This should reduce your zero current “power” to 12.5 VA.

Thanks for taking the time to reply in detail, I really appreciate the support. I’m a mechanical engineer but my electrical engineering is pretty ‘rough’. The last few days playing with this have been very frustrating, but hell I’ve learned a lot!

I took a look at that test report, it’s impressively linear in the low-end measurements, but as you point out later in your reply, looks like a far more sensitive detection circuit than the ADC on an Arduino.

Forgive my ignorance, but isn’t the current also alternating therefore would have a zero crossing?

I’ve done no conditioning beyond the 10uF capacitor recommended in the circuit and whatever clever tricks are written into the Emonlib, as you mention looks like without voltage input most of them don’t work.

Are you referring to the high & low pass filter examples here? Learn | OpenEnergyMonitor

Good suggestions on adding extra windings

I’m struggling to find the page on the emonTx V4 configuration in the learn section, could you send the link please?

(Please excuse this tangent but I’ve always be curious about this, and the mention of phase error brought it up in my mind)

With regards to phase error do you mean directly that which is caused by inductive or capitative loads? Given my whole street will be fed from the same transformer do I share the power factor of everybody on my street on the same phase as me, influenced by all their devices?

I had a friend recently talking about AC voltage stabilisers and suggesting they could save money is there actually any truth in this? I know large factories use power factor correction to avoid being charged extra by the utility company. Domestically in the UK are we billed for apparent power or real power?

Amazing project and thanks for the support. Long term when I have solar panels, I’d like something to tell my car charger’s API to turn on & alter the charge current proportionally as it’s not “solar ready” by default even though it could be. The resources here have been a great building block project to get there. Even if in the a shop bought Emon device is the hardware I settle for, it’s nice to understand more about how it works.

1 Like

Yes - but the amplitude of the voltage doesn’t vary (much) so it can be detected reliably. If you have a low current, possibly with a highly distorted wave shape (compact fluorescent lamps are a prime example) you might well end up with four crossings per cycle, or if the current is very small, can you reliably detect a crossing at all?

That’s not surprising, it isn’t there! it’s something I need to write. Here’s a draft diagram:

The circuit diagram should be on Github (it is: emontx4/hardware/v4.0.5 at main · openenergymonitor/emontx4 · GitHub), and you’ll need to download and install Eagle CAD (free) to view it.
Here’s a screenshot of just one c.t. input, they’re all the same. The line labelled “CT2” goes to the ADC input of the processor. R3 & R8 aren’t fitted in the V4 because the c.t’s are voltage output type, that’s where your 18/22 Ω burden goes for the 50 mA c.t. R11 & R12 will be equal for you (to put the bias at the mid-rail voltage)

No and no again.
The phase error of the c.t. is a property of the c.t. itself (or any transformer - they all have one, mostly it’s of no concern) and the big horror is, it varies with current (and for a voltage transformer, with voltage) unless you pay a lot of money - around the same price as your emonTx - each.

When you refer to phase and reactive loads, that’s a property of each individual load, and (assuming it’s a nice linear load out of the text book) it means the current lags the voltage (inductive load), or leads (a capacitive load). You have an overall phase lag (normally) for your whole house, and the street too has an overall phase lag, and so does the whole national grid. From the power company point of view, the whole street/town/country has a power factor.

But your neighbours have no influence on you, because you don’t have a frame of reference for them - you can’t measure the current they are drawing, and even if you could, it only affects your voltage due to resistance drops in the cable.

Directly, they might actually cost you money, and that’s ignoring the capital cost. They must have internal losses, they will get warm, who pays for that? If your voltage is very high, one might save on lamp and appliance life, but I can’t recollect ever seeing any data to substantiate this. The general consensus is, don’t waste money on buying one. Possibly worse is “Power factor correction” - if it’s a capacitor on the assumption that your load is inductive, then it might actually increase your line voltage and reduce appliance and lamp life. The power company will be pleased (a bit, but not if everyone gets one) but again, it’s almost certainly a waste of money for the domestic consumer.

You are billed for real power - as far as I know, it’s the same for domestic users over most of the world.
Large users get charged for vars because they cost the supplier in terms of extra current they can’t otherwise charge for, which means fatter cables and bigger transformers and higher I²R losses, so bigger generators and more fuel to feed them.

Thanks again! Good to know about the domestic home voltage stabiliser stuff, it didn’t pass my sniff test either but I couldn’t explain fully why to myself as with my limited knowledge of power factors / reactive loads it seemed “possible”.

So what have I learned the last few days? Summary for the next beginner like me who maybe comes across this.

• The current only system into an ADC works alright for a quick and dirty setup ~10% accuracy but only above 2kW with a 100amp sensor, so this would actually work for a quick and dirty dump load setup as most cars won’t charge lower than 1500W anyway.

• The world of AC current & voltage measurement using analogue inputs is quite a bit harder and more involved than I thought, previously I’ve been spoilt buying digital sensors and doing fairly easy things like measuring temperatures.

• Cleaning my copper strip board with meths to remove flux that seemed to cause spurious conduction issues was a good idea, I’m glad I did that having read it somewhere else. I’d have easily missed this.

• Any future analogue / AC projects I’ll space the components on my strip board out a lot more to try and avoid interference effects or just not use it.

• If you want something more accurate and especially linear below 8amps on 100amp CT you’re going to have to include the voltage measurement as well & or use the V4 circuit above.

This is my next step, am looking around for a suitable transformer!

Thanks to you, Robert, for the input & help.

1 Like

That might be counter-productive - you increase the size of the “aerial” if you do that. It’s external stuff - electric and magnetic fields floating past - that you don’t want to pick up. The other source is down the power supply from wherever you get the power, this could well be the principal route.
Remember the old saying: digital is analogue that’s being driven too hard!

You could do a lot worse than copy what the emonVs does: a ZMPT101B (NOT the module - that’s no good for power measurements), though you’ll be losing resolution by using less than a third of the available voltage of your ADC (a fifth if you run at 5 V) that won’t matter much for the voltage measurement. You need the 60 kΩ series resistors to turn the mains voltage into a current, then the rest of the circuit is as for the c.t., but with a 75 Ω burden for the ZMPT101B (you could increase that a bit I think, if you want to go that route I’ll do the sums).
Failing that, most low voltage isolation transformers will be suitable, as long as the output is more than about 1.75 V rms (~ 5 V peak-peak to suit the 5 V Arduino), you can divide the voltage down to suit.
I can’t even give you a hint for what the phase error might be - you’d have to find out by trial and error.