Page 2 of 2

Re: Measure AC with SCT013, ADS1115 and ESP8266

Posted: Mon Jul 12, 2021 12:36 pm
by Fernando Perez
Dear Bugs, you don't know how much I appreciate the trouble you are taking with this topic.
I explain my objective: One of my daughters lives in the countryside, in an old rural house divided into two independent apartment with a single electricity supply network.
In the second home they installed a conventional meter and until now she divided the amount of the monthly bill with her neighbor without problems, taking into account the indications of this meter.
But recently, the Government of my country has regulated that the consumption and billing of ALL electrical installations will be calculated by applying hourly discrimination in three intervals, and even differentiating the weekends from the rest of the days.
My idea is to apply this scheme:
image.png
Each ESP8266 will calculate the consumption of each home by the hour of each day, recording it in files that will be uploaded to an Internet server equipped with MySQL.
I think that, even if I do not get real measurements, either due to inaccuracy of my program or limitations of the components used, the data thus obtained can help a lot in the apportionment of total consumption bills.
In relation to your observations: I set the gain of the ADS1115 to 1.024V to try to get more accuracy in the measurement. Note that my coil delivers 1 volt for every 30 amps of current drawn and that every home facility has 20 amp limiters. They would automatically trip the IGAs before reaching a draw of 30 amps.
On the other hand, I am amused that the multimeter I am using appears to be identical to yours, except for the sticker with the mark. If so, note that you can use the AC millivolt scale for more precision.
image.png
image.png

Re: Measure AC with SCT013, ADS1115 and ESP8266

Posted: Mon Jul 12, 2021 2:08 pm
by PeterN
Dear Fernando,
that interesting topic gets deeper and deeper:-)
I can follow your thoughts - if the current drawn by the circuit behind the 7805 is constant. Otherwise the parasitic elements of the transformer get relevant and the input voltage of the 7805 goes down. However, I doubt that to be really relevant

But, if you should want to take the voltage (not phase) into account, you will have again the uncertainty of getting the peak of the voltage from many voltage samples - so why not take the DC voltage at the input of the 7805 ?

But I really don't want do make it more complicated and even have to admit that I have deep respect if there is a voltage of more then 24V in the curcuit ;-)

Good luck!
CA5D962F-C840-4EA9-81DB-44AB3803DF62.jpeg

Re: Measure AC with SCT013, ADS1115 and ESP8266

Posted: Mon Jul 12, 2021 2:59 pm
by Fernando Perez
Peter, you're right again. My initial idea was to use a small 220v to 6v transformer, only 2w, like this:
https://es.aliexpress.com/item/10050015 ... 3a5276d8-1
But then I thought I would take advantage of it to power the ESP8266, which would produce all the problems you mention!
What do you think if I omit the entire right part of the diagram and use the second differential input of the ADS1115?
image.png

Re: Measure AC with SCT013, ADS1115 and ESP8266

Posted: Tue Jul 13, 2021 11:10 am
by PeterN
Could this module be helpful to you - if you want some more datas ?
PZEM 004T V3
CC241A83-6A0A-4E77-9973-968C93EB6169.jpeg

https://innovatorsguru.com/pzem-004t-v3/
http://innovatorsguru.com/wp-content/up ... Manual.pdf

If I understand it correctly, the module even could be addressed and in your application with two houses , one esp8266 could read and transfer the data of two modules.

Re: Measure AC with SCT013, ADS1115 and ESP8266

Posted: Tue Jul 13, 2021 5:13 pm
by Fernando Perez
It looks like a really interesting module and if it does what it promises, it could be the heart of a future "electric network quality analyzer" project.
But it would be excessive for my current project.
I have realized that I am complicating things too much and that everything may be easier than I thought.
The final purpose is to divide an invoice into proportional parts between the two consumers.
I think it is enough to store, by hours and separately, the millivolts indicated by each of the meters in each house every second and minute.
It is not necessary to calculate powers or consider variations in network voltage.
Thus it would be enough to divide the total amount of the invoice according to these, we could call them "coefficients".
I am very grateful to both of you, PeterN and Bugs.