# Current Transformer

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:
}
}

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++)
{
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= (VacAmps*(float).028);
Serial.print("Apps: ");
Serial.println(VacAmps);

delay(1000);
}
``````

You might find this page more helpful: Learn | OpenEnergyMonitor

My approach for calibrating the system would be to measure the rms voltage across the burden resistor, for several known currents (as you seem to be doing) and fit a line to that using a least squares program.

There are several websites that will perform that fit for you, then you have a simple equation that gives the current as a result of the rms voltage across the burden resistor.

Burden resistors need to be sized as per the CT spec and not just to give the voltage you want .
If this is a simple CT , then the output is an AC signal which can’t be directly read by the Arduino .

Note also you can loop your primary wire multiple times through the CT to increase the output ( e.g if your load is 5A , if you loop the wire three times through the CT it will read 15A.) This can make better use of the range of the CT.

You can buy AC current transducers that have a DC output and are therefore easier to use

sapman:
Hello all,

I'm working on a project to measure ac current of an electric motor.

What kind of motor?

@MarkT - It's a 1hp / single phase (110vac/60hz) It runs a vacuum pump. part of monitoring the current (and temp) is to warm the pump up before applying the load so it does not overload the circuit. most of the time it is 0c out side when it is running. it also run for days at a time.

@jremington and @hammy -
I did track down my issue down to how the website was do the calculation (or how i was understanding it). I did find a couple burden resistor calculators and some datasheets for current transformers with the formulas to use. it did verify that the resistor size i chose was correct for the Arduino and the max current i will be measuring.

After getting my head around this, it all came down to the following to figure it out:

// Es = Ip * (Rb/Tr) - Calculate burden resistor
// Rb = Tr(Es/Ip) - Es - Max voltage to Arduino (4.5v), Ip - Max Current to be read - Load
// Es = ADCrms * (5/1023) - ADC 10 bits (0-1023)
// Is = (Es/Rb) : Is - Current of secondary, Es - Voltage of secondary, Rb - Burden Resistor
// Ip = (Is*Tr) : Ip - Current of primary, Tr - Current transformer ratio

as i was typing this i went back and looked at his formula and he was multiplying the primary voltage back in, and was actually calculating power/watts and not current. I should have caught that.

thanks --- dane ---

Based on your application and I assume an industrial application I would consider using an AC Current Transducer and forget just using a straight current transformer. I have monitored motor current for assorted pumps running single and poly phase at voltages from 120 to 4160 and if you want to keep this simple I would spend the \$100 USD and get a transducer along these lines.

https://www.crmagnetics.com/ac-current-transducers/average-rms/single-element/cr4410

They are 24 VDC powered and you can get 0 to 20 AAC outputs 0 to 5 VDC. I have seen off the boat versions for under \$50 USD and the link is merely an example but a Google of AC Current Transducers will bring up a dozen hits or more to similar. I have used the CR Magnetics stuff in some harsh environments and some were running 20 years plus when I retired. Your call but for a commercial application you may want to consider something like this.

Ron