I see this issue has been posted a number of times including the one I stole my tittle from but yet I do not see a solution to any of them.
I am using the current_only.ino program as supplied in EmonLib and get the exact same results as described in a previous forum post with the same title by hammad426623.
As hammad426623 posted I also get a current of 0.13 A with no load.
In other words, with a 120V source it is telling me that the "no load" is consuming around 30W. Or, if I were measuring with a 240VAC source it would be 60W.
And I have spent a number of days now tinkering with little improvement. For example, I have carefully soldered these parts directly to my uno with the electrolytic capacitor in parallel with a 0.1 ceramic and even tried a 10uf ceramic.
If this is the way it is then I do not see this as being very useful. So I have two questions:
Is this as good as it works or what am I doing wrong.
Is there any code someone has done that does work properly that can also measure real power and pf etc.?
And imagine the current transformer requires an external Burden resistor as suggested in this schematic. Now remove the current transformer so that only the Burden resistor is present. In this situation only the midpoint or bias point is present to the ADC input. In other words, no signal which means no load current.
In this scenario I expect the current output to be zero but it is not, instead it wanders around 0.13 A and higher. I have played with the hardware doing things like soldering more directly to the UNO 328 and added an additional 0.1uf bypass capacitor and while I have improved it I am not able to achieve better than 0.13A.
Now if I calibrate the circuit, for example I used this: "emon1.current(36, 199.5);" then it works as expected with higher currents but has an increasing error at lighter loads due to this issue where zero load results in 15.6W (0.13A) at 120VAC or if I was using 230Volts it would indicate 30W with no load.
I hope this is more clear without being too wordy.
But that 0.1% accuracy is only good for full current readings of 100A. So this is at 100A and I need to add this to the accuracy of the CT which is 1% so the total accuracy is 1.1% which I agree is very good.
But that 0.13A is a constant meaning that anything below 100A will have a progressively larger error.
At 50A the error becomes: 1% + ((0.13/50)*100) = 1.26%.
Then at 10A the error becomes: 1% + ((0.13/10)*100) = 2.3%
Then at 1A the error becomes: 1% + ((0.13/1)*100) = 14%
Now, what if I use the SCT013-005 which measures up to 5A?
Now full scale starts at 3.5% error (1% + 2.6%) and degrades much more rapidly making it unacceptable very quickly.
Sorry not to respond sooner but I have been busy. I have googled some more and my suspicions are correct. The ADC in both the ESP8266 and ESP32 are poorly designed resulting it excessive noise due to the WiFi.
Please see this link for more information:
Don’t forget the A/D only resolves to one part in 1024 , or 0.1% - so you can’t expect to read better than 100mA anyway ( actually less ) , add to that noise , component tolerance, CT performance at low current , your bias not being spot on ( so you have a voltage when there is no current, R1 andR2 not identical ) you are expecting too much , this is hobby stuff - make any reading less than say 200mA zero.
You might be better off with a more appropriately ranged CT and a better circuit .
BTW a domestic electricity meter doesn’t have the accuracy you seek