Hello all,

I’m working on a project to measure ac current of an electric motor. I’m using a 2000:1 current transformer (no resistor). I’m using a voltage divider using 2 - 10k resistor and a 345ohm burden resistor. I’m basing everything off from this web site: How to use Non-invasive AC Current Sensors with Arduino – Scidle

I need to measure a max of 20amp. before i hooked the circuit up to the Arduino Nano, i ran the line wire through the coil and powered on the device (1500 watt heater for testing only). using my clamp on meter, it read 12amp on high. i sized the burden resistor until i was getting about 2vac on the coil. I assumed this would be a good stop to start.

My issue is understanding some of the sample code, that is also on that page and i’m hoping someone could help me out.

It is this part of the code and information i don’t fully understand (maybe other parts too).

```
// total = sqrt(SumSqVClamp/numReadings);
// total= (total*(float)2/3); // Rburden=3300 ohms, LBS= 0,004882 V (5/1024)
// // Transformer of 2000 laps (SCT-013-000).
// // 5*220*2000/(3300*1024)= 2/3 (aprox
```

I’m assume that represents 5v, 220 is the VAC (my case will be 120), 2000 are the number of turns in the CT, 3300 is the burden resistor (345 for mine), 1024 is the sample per volt. when i calculate it all out i come up with 3.39, in my code to make the output from the Nano match my clamp on meter i use 0.028. this was sampling at 3 different currents, 5a, 8a, 12a . i believe this is calculating “I=V/R” but i can’t get my head around it to understand why there is a difference.

For what i need i could just move forward, but i would like to know what I’m missing in understand what is going on.

here is my code:

```
// Testing using a NANOv3
// Current Transformer 2000:1 - ZDCT004GL
const unsigned int numReadings = 200; //samples to calculate Vrms.
int readingsVClamp[numReadings]; // samples of the CT-In
int readingsGND[numReadings]; // samples of the virtual
float SumSqGND = 0;
float SumSqVClamp = 0;
float VacAmps = 0;
int PinVClamp = A3; // CT In
int PinVirtGND = A4; // Virtual Ground
void setup() {
Serial.begin(9600);
// initialize all the readings to 0:
for (int thisReading = 0; thisReading < numReadings; thisReading++) {
readingsVClamp[thisReading] = 0;
readingsGND[thisReading] = 0;
}
}
void loop() {
// Calculate Current / Amps
// Current Transformer - 2000:1
unsigned int i=0;
SumSqGND = 0;
SumSqVClamp = 0;
VacAmps = 0;
for (unsigned int i=0; i<numReadings; i++)
{
readingsVClamp[i] = analogRead(PinVClamp) - analogRead(PinVirtGND);
delay(1); //
}
//Calculate Vrms
for (unsigned int i=0; i<numReadings; i++)
{
SumSqVClamp = SumSqVClamp + sq((float)readingsVClamp[i]);
}
// total = sqrt(SumSqVClamp/numReadings);
// total= (total*(float)2/3); // Rburden=3300 ohms, LBS= 0,004882 V (5/1024)
// // Transformer of 2000 laps (SCT-013-000).
// // 5*220*2000/(3300*1024)= 2/3 (aprox)
// 5*120*2000/(345*1024)= 3.3967
// 120000/353280
VacAmps = sqrt(SumSqVClamp/numReadings);
VacAmps= (VacAmps*(float).028);
Serial.print("Apps: ");
Serial.println(VacAmps);
delay(1000);
}
```