AC Current Measurement using Arduino Uno

In this project, we are using current transformer as current sensor. Current Transformer is a device/machine which converts high current from primary to low current at secondary winding which can be easily in proportion to transformation ratio.

Current transformer has two windings primary and secondary, generally primary winding has single turn and secondary has large number of turns.

Transformation ratio = Ipri/Isec=Nsec/Npri

Ipri = primary current

Isec = secondary current

Npri = primary Turns

Nsec = secondary Turns

Current transformer used in this project is ZMPT103C which has turns ratio of 1:1000 that means one turn on primary and 1000 turns on secondary. ZMPT103C is capable to measure current up to 10A (on primary) which produce 10mA on secondary.

The mains wire either phase or neutral needs to be passed through the hole of above ZMCT103C. This mains wire acts as primary of CT. The leads brought out are from secondary of CT.

Caution : Never pass current through primary of CT when secondary is open circuited.

Always keep burden resistance connected across secondary of CT.

Here we use burden resistance of 33ohm.

Connect CT as shown in below figure.

ZMCT103C Micro Current Transformer | 5A / 5m | Arduino Code

In above figure R6 is used as burden resistance R8 and R7 is used as potential divider. The voltage across burden resistor is AC but microcontroller can recognize DC only so as to shift the AC voltage above ground level we connect one of terminal of CT in between R8 and R7, where as other terminal of CT goes to analog pin A1 of Arduino Uno (or ATMEGA328P). C3 is smoothing capacitor.

Now, whenever 5Amp of current flows from primary 5mA flows from secondary (calculated using transformation ratio). This secondary current produces voltage drop of Vburden =5mA*33ohm. (ohms law V=I*R)

Therefore, we get Vburden =165mV this voltage (AC) +2.5V(DC from potential divider) is fed to analog pin A1 of Arduino therefore voltage received by analog pin when 5 Amp current flows is 2.665V.

To make calculation easy we include emon library in our Arduino code. To install emon library in code you need to install it first to install, open the Library Manager in the Arduino IDE and install it from there. (Make sure your computer is connected to internet while installing.)

Arduino code for measuring current up to 10 amp current 50Hz is:


#include "EmonLib.h"                   // Include Emon Library
EnergyMonitor emon1;                   // Create an instance

void setup()
{  
  Serial.begin(9600);
  
  emon1.current(1, 27.59);             // Current: input pin, calibration.
}

void loop()
{
  double Irms = emon1.calcIrms(1480);  // Calculate Irms only
  

  Serial.println(Irms);          // Irms
}

Leave a comment

Design a site like this with WordPress.com
Get started