(WELP!) SCT013-020 Current Sensor + AC Current Conversion Module Issues

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!

Its rather doubtful the converter module would be damaged by using a current transformer type output. The current output device has clipping diodes and there is not that much energy transferred.

What is your current configuration? Pls sketch the ckt.

John

REVISED I found the schematic for your module. A current transformer connected to it will definitely NOT damage the module. Also, if you believe their datasheet, the 30A device is a voltage output model.

@JohnRob

The circuit diagram only goes only as far as the product documentation shows it. Nothing more. I'm just curious as to why it's showing the wrong readings despite how simple the code and circuit actually is.

I'll try replacing the clamp meter with another one or the Arduino itself. I'll keep you posted for any changes.

Thanks again!

Hi,

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)).

Using 0.2A as your reference for a device that is 20A full scale output, is probably the error.
0.2A is 1% of its full scale.
The output of the clamp will be 1% of 1V = 0.01V.
Being so low a signal level, you are having resolution problems with the AtoD.
Each count of the AtoD will be 5/1023 = 0.0048V

To do your test you will need at least 5A to test the response of the clamp.

You can do this with your setup by winding the wire with the 0.2A current flowing though it, through the clamp,
25 times>> 25 x 0.2A = 5A seen by the clamp.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

What model Arduino are you using?

Tom.. :slight_smile:

When I posted about the current sensor not being able to damage the circuit it was late and I didn't go into some other details.

  1. The circuit I found is a peak detector meaning the output will be 1.414 X the RMS value. Most multimeters are calibrated to the RMS value (of a sine wave).

Also noise spikes on the current will cause the circuit to read them as real current peak.

  1. Current transformers react to the current of the wire going through the hole (bear with me here). So if you have a 0.2 Amp known current, you could run the wire through the clamp opening 10 x and then read 2A, or 20X and read 4A all with the same 0.2A current.

@TomGeorge

Hi there! Thank you for replying.

Sadly I currently don't have a 5A clamp meter with me, and this sensor's all I've got for the meantime due to time constraints. But I'll try to look into your solution because it did clarify some things for me.

On the other hand, I've been trying this circuit with still no good results for the SCT-013-000 here @ https://www.poweruc.pl/blogs/news/non-invasive-sensor-yhdc-sct013-000-ct-used-with-arduino-sct-013. Will still troubleshoot the circuit.

I'm going to do this circuit on the other hand and will keep you posted for any significant results. Link here @ Energy Monitoring using Pachube, Arduino 1.0 and SCT-013-030 | roysoala on the web.

I'll be posting my circuits later since I'm very swamped by other things as well.

@JohnRob

Thank you for the insight. IT was also said by our consultant that the converter itself is not accurate. WIll be doing a more discrete component-approach on this, just like the link I included above.

Sorry guys I'm on quick reply!

Hi,
You don't need a 5A clamp meter, just pass the wire through your clamp ONCE but pass the wire through the sensor 25 times.
You measure 0.2A on your clamp meter, but 25 times that on the current sensor.

Tom.... :slight_smile:

@TomGeorge

Hiii and good morning. Glad to see you still replied to my last message.

Here's my circuit BTW.

Almost all sources in the web point out to the same circuit when using the sensors alone with their jack outputs.

Another source is here and from the EmonLib main tutorial page as well. I'm having problem with the latter tutorial.

I'm not sure if the sensor I have is broke or whatsoever to give such wrong readings. Do you have any idea in mind to determine how I possibly got it broke?

Thank you and have a nice day!

I'm currently using this tutorial for my project and it's working well with my SCT-013-030 (30 A) sensor. I'm getting fluctuating readings when I'm charging my laptop.

Understanding that the source draws current proportional to the current battery levels, is there anything I can do to at least lessen the effect of a non-constant current load(s)?

1 Like

Hi,
OPs circuit;
SCT-013-100-arduino-interfacing-600x380.jpg
Good to see you are progressing.
Can you post your code please?
If it is the code you posted at the start of this thread, it is not detecting peak voltage, it is adding and averaging the readings, not looking for peak current, then calculating the RMS current.
This will be why you have varying readings.

Tom... :slight_smile:

SCT-013-100-arduino-interfacing-600x380.jpg

@TomGeorge

Hi and good morning there!

Sorry I kind of replied late for this post. I already got quite accurate readings by using another sensor (the SCT-013-30) with the following bare-bones code. I discontinued using the SCT-013-000 for the meantime since I'm still experiencing some issues regarding its usage. Though I would say the diagram you posted is already corrent, according to many different sources. But I'll check on it some other time nonetheless.

The only difference between the circuit design is that the 33-ohm burden resistor is removed (since the SCT-013-000 doesn't have one).

Thanks for that!! :slight_smile: :slight_smile:

I hope this helps everybody!

#include "EmonLib.h"

EnergyMonitor emon1;
int currSensor = A0;

void setup() {

pinMode(currSensor, INPUT);
emon1.current(currSensor, 29);

}

void loop() {

Irms = emon1.calcIrms(1480), Iequiv = Irms * 0.7071;

}