AC Current Monitor With Arduino ESP8266 & Google Spreadsheet

by AnnaMai in Circuits > Arduino

1400 Views, 1 Favorites, 0 Comments

AC Current Monitor With Arduino ESP8266 & Google Spreadsheet

Annotation 2023-11-10 164218.png

This article will show how to use AC Current sensor SCT013 20A/1V or similar one to measure AC current in your home.

Supplies

  1. ESP8266 https://amzn.to/3ZfjXVp
  2. AC Current sensor https://amzn.to/46fgoC5
  3. Fluke 302+ https://amzn.to/3QKFFiY
  4. Power supply 5VDC https://amzn.to/3SoaVFt

Those part list is Amazon link with paid.

Circuit

circuit.jpg
Annotation 2023-11-10 160922.png
Annotation 2023-11-10 163330.png
Annotation 2023-11-10 163352.png

Make the circuit like the diagram: it is a simple circuit with few resistor and capacitor. In my case, I wrap it up with yellow insulation tape, just looks fine :)

Notice in the circuit: a Burden sensor

The sensor with specification style: 20A/1V -> already had Burden sensor inside -> no need to add R3 in the diagram

The sensor with specification style: 100A:50mA -> NO Burden sensor inside -> NEED to add R3 in the diagram

The ESP8266 will read AC current and push data into Internet: Google Spreadsheet -> a excel style to save all data in which you can access data any time, any where with Internet

Code Works

Annotation 2023-11-13 133308.png
Annotation 2023-11-10 163431.png
Annotation 2023-11-10 163453.png
Annotation 2023-11-10 163208.png

There are 2 kind of codes:

1 - Arduino code

2 - Google Spreadsheet code

Those code can be downloaded at Google Drive link https://bit.ly/3Qq7lrT


In Arduino code, notice the declaration section about sensor factor:

 //SCT013.current(pinSCT, 60.606); //for sensor 100A:50mA (ratio 2000:1 at 33Ohm Burden resistor -> 2000/33 = 60.606)

 SCT013.current(pinSCT, 20);    //for sensor 20A/1V

If your current sensor has different specification with mine, just calculate new factor and modify the code.

Overall, the Arduino will connect Internet by your wifi router, then read AC current -> write data on Google Spreadsheet.

The way to make connection between ESP8266 and Google Spreadsheet can be found at Instructables https://www.instructables.com/ES8266-Data-Logger-Temperature-Monitor/

If everything runs smoothly, the result will be shown on Google Spreadsheet as picture. In this project, the data of 1 day will be saved in every sheet from 00:00 to 23:59, so we can read it very easy and prevent data lost (because 1 Sheet is limited with specific rows)

Calibration

IMG_2274.JPG
IMG_2266.JPG
IMG_2273.JPG
Annotation 2023-11-10 163602.png

This is just a option step, you're possible to by-pass it with no problem.

We will use a good one Clamp meter to compare result between Clamp meter and our sensor reading.

In this case, we use Fluke 302+ for comparation. (In standard calibration process, this one should be verified by third parties with Certificate. However, we will "trust" it because it is well-known brand).

We will find a big power consumption device like heater, pump, chiller ... or any device you can get. Then measure the AC current with our sensor and the Fluke clamp meter as many ranges as possible.

In this case, we have 3 point (Unit: Ampere):

ESP8266 0 1.83 15

Clamp meter 0 1.9 15.81

Then, we will use Microsoft Excel to draw a chart to show relation between them -> show the factor of the equation between them. The factor will be applied in Arduino code in this section:

 double I_calib = Irms*1.0548-0.0142; //use calib factor here

You can see that, our sensor reads 15A, while the Clamp meter Fluke reads 15.81A -> not so different. So that's why you can by-pass this step if you don't need it very accuracy.

Test Run

Annotation 2023-11-10 163045.png
Annotation 2023-11-10 162953.png
Annotation 2023-11-10 163019.png
Annotation 2023-11-10 163253.png

Install the sensor at your home main circuit breaker (take care about safety during working with 220VAC, even this sensor is very safety because it is no need to touch or modify the cable, but during you installing it, probably you will touch something 220VAC. So take care your safety first!)

Then, plug the power for ESP8266 and now you can monitor your home appliances (the graph in Google Spreadsheet is drawn manually by me, you can do it)

I notice, when I monitor the AC current my home, I comprehend about electric save. I hope it will be same for you to save Earth: use less electricity!

Watch the Video

Energy monitor arduino - DIY AC Power meter IOT

Overall, I made a video for it. You can watch it for easy understand. Thank you very much.