Measure AC with SCT013, ADS1115 and ESP8266

If doesn't fit into any other category ....
User avatar
Fernando Perez
Posts: 106
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 55 times
Been thanked: 54 times

Re: Measure AC with SCT013, ADS1115 and ESP8266

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
PeterN
Posts: 97
Joined: Mon Feb 08, 2021 7:56 pm
Location: Krefeld, Germany
Has thanked: 41 times
Been thanked: 45 times
Contact:

Re: Measure AC with SCT013, ADS1115 and ESP8266

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
Fernando Perez
Posts: 106
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 55 times
Been thanked: 54 times

Re: Measure AC with SCT013, ADS1115 and ESP8266

Post by Fernando Perez »

Peter, you're right again. My initial idea was to use a small 220v to 6v transformer, only 2w, like this:
[External Link Removed for Guests]
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
You do not have the required permissions to view the files attached to this post.
User avatar
PeterN
Posts: 97
Joined: Mon Feb 08, 2021 7:56 pm
Location: Krefeld, Germany
Has thanked: 41 times
Been thanked: 45 times
Contact:

Re: Measure AC with SCT013, ADS1115 and ESP8266

Post by PeterN »

Could this module be helpful to you - if you want some more datas ?
PZEM 004T V3
CC241A83-6A0A-4E77-9973-968C93EB6169.jpeg

[External Link Removed for Guests]
[External Link Removed for Guests]

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.
You do not have the required permissions to view the files attached to this post.
User avatar
Fernando Perez
Posts: 106
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 55 times
Been thanked: 54 times

Re: Measure AC with SCT013, ADS1115 and ESP8266

Post 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.
Post Reply