i m trying to use sct 013 to calculate the curent consumption as in this project;
https://learn.openenergymonitor.org/electricity-monitoring/ct-sensors/how-to-build-an-arduino-energy-monitor-measuring-current-only
and i put this code in my arduino uno
#include "EmonLib.h" // Include Emon Library
#define CURRENT_CAL 40
EnergyMonitor emon1; // Create an instance
void setup()
{
Serial.begin(9600);
emon1.current(0, CURRENT_CAL); // Current: input pin, calibration.
}
void loop()
{
emon1.calcVI(20,700); // Calculate all. No.of half wavelengths (crossings), time-out
float currentDraw = emon1.Irms; //extract Irms into Variable
Serial.println(supplyVoltage);*/
Serial.print("Current: ");
Serial.println(currentDraw);
}
after i do my calibration i use the power consumption of my pc (0.20/0.30 A) i can get the values correctly
but i have a problem with a spike in value that dont show up on my kilawattmeter.
and the second problem is when i add more power consumption the values differ between the kilawattmeter and the sensor.