Hey guys! It's been a long time ever since I was working on a hardware project.
So what I'm currently doing is an electrical overloading detection system. I'm using the SCT-013-020 current probe (voltage output type), which can detect up to 20 amps of current. To convert its output voltage into Arduino-readable values, I'm using it with an AC Current signal conversion module. Both are found here in their store.
However, I initially used the SCT-013-000 with the signal conversion module, not knowing it may be current-type output or voltage type, as hinted in its datasheet.
One clue howsoever was that the sensor bears a mark saying "100A:50mA", which led me to think it is a current-type output sensor, which was also discussed here. I decided afterwards to change my sensor.
/*!
* @file readACCurrent.
* @n This example reads Analog AC Current Sensor.
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @licence The MIT License (MIT)
* @get from https://www.dfrobot.com
Created 2016-3-10
By berinie Chen <bernie.chen@dfrobot.com>
Revised 2019-8-6
By Henry Zhao<henry.zhao@dfrobot.com>
*/
const int ACPin = A2; //set arduino signal read pin
#define ACTectionRange 20; //set Non-invasive AC Current Sensor tection range (5A,10A,20A)
// VREF: Analog reference
// For Arduino UNO, Leonardo and mega2560, etc. change VREF to 5
// For Arduino Zero, Due, MKR Family, ESP32, etc. 3V3 controllers, change VREF to 3.3
#define VREF 5.0
float readACCurrentValue()
{
float ACCurrtntValue = 0;
float peakVoltage = 0;
float voltageVirtualValue = 0; //Vrms
for (int i = 0; i < 5; i++)
{
peakVoltage += analogRead(ACPin); //read peak voltage
delay(1);
}
peakVoltage = peakVoltage / 5;
voltageVirtualValue = peakVoltage * 0.707; //change the peak voltage to the Virtual Value of voltage
/*The circuit is amplified by 2 times, so it is divided by 2.*/
voltageVirtualValue = (voltageVirtualValue / 1024 * VREF ) / 2;
ACCurrtntValue = voltageVirtualValue * ACTectionRange;
return ACCurrtntValue;
}
void setup()
{
Serial.begin(115200);
pinMode(13, OUTPUT);
}
void loop()
{
float ACCurrentValue = readACCurrentValue(); //read AC Current Value
Serial.print(ACCurrentValue);
Serial.println(" A");
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(500);
}
Now as I'm taking some readings with some simple code from the product documentation of the seller (DFRobot), I'm quite worried that the sensor may now be getting wrong readings due to the fact that I initially used a current-type output instead of the intended voltage-type output. I'm using a legit clamp meter (Sanwa DCM60R) to compare their values.
I'm not thinking that it would be possible to destroy the conversion module this way, or is it?
Attached are the readings of the SCT-013-020 utilizing the code above, while the clamp meter's readings measure at 0.2 A (with a fully-charged laptop and electric fan load)).
Is it also possible to get even more accurate readings?
Thanks a lot guys!