Holiday closure - we will be closed Thursday 30 June until Monday 4 July. See homepage.

CT1 Example

Mini Current Transformer Example

Mini Current Transformer with Arduino Uno

This is a quick project we used to check the function of the 400:1 mini current transformer (ST070). It was used to measure the current flowing to a 3 heat setting room heater by means of a sketch running on an Arduino Uno clone (M009).

The neutral to the heater was cut and passed through the centre of the current transformer to form the primary.
The secondary - the flying leads from the ST070 - were connected to the circuit below.

The output of the current transformer needs to have a "burden" resistor (R1 in the circuit above) connected across its output to convert the output current to a voltage. The choice of value was based on observations of the voltage waveform produced at the output using the maximum power setting on the heater. By Ohms Law, a higher resistance will produce a higher and more easily measured voltage, but it was noted that the higher the resistance the more distorted the waveform became, so 6R8 was chosen as providing a good compromise.

The resistor ladder formed by R2 and R3 biases the output signal to the centre of the 5V supply - we cannot connect the current transformer directly to 0V as the output would be -ve on each half cycle of the mains, so this arrangement allows the signal to swing to either side of 2.5V. This could be fed directly to the 'duino adc pin, but to improve accuracy it was decided to include a low gain amplifier section to boost the signal with the added benefit of adding a buffer between the transformer and the adc.

  //Read adc with current transformer input

const int Itrans = A0;

float Vpeak;
float Ipeak;
float Irms;
float Iwire;

void setup() {

float measure()  //find the peak voltage
  float result;
  int readValue;             //value read from the sensor
  int maxValue = 0;          // store max value here
  uint32_t start_time = millis();
  while((millis()-start_time) < 1000) //sample for 1 Sec
       readValue = analogRead(Itrans);
      // see if you have a new maxValue
       if (readValue > maxValue) 
           /*record the maximum sensor value*/
           maxValue = readValue;
   // Convert the digital data to a voltage
   result = (maxValue - 512) * 5 / 1024.0; //-512 removes the 2.5V offset voltage.
   return result;

void loop() {
Vpeak = measure()/6.8; //voltage is amplified - gain measured at 6.8
Ipeak = Vpeak/6.8 * 1000.0; //6R8 burden resistor on transformer o/p - result in mA
Irms = Ipeak * 0.707;
Iwire = 0.4 * Irms; // 400:1 transformer so result x 400 then /1000 for a result in Amps

Serial.print("ADC Voltage measured : ");
   Serial.print("Peak current through burden resistor : ");
   Serial.println(" mA");
   Serial.print("RMS current through burden resistor : ");
   Serial.println(" mA");
   Serial.print("Load Current : ");
   Serial.println(" Amps");


Running the sketch while measuring the current using a multimeter gave the following results:
Current measured 2.67A, current reported by the sketch 2.7A
Current measured 5.14A, current reported by the sketch 5.2A
Current measured 7.64A, current reported by the sketch 7.7A

Your IP Address is:
Copyright © 2022 Bitsbox. Powered by Zen Cart