Energy monitoring with Arduino and current clamp sensor


SNS-CURRENT-CT013-100A is split core current transformer which allow you to non-intrusively measure AC current. It’s safe even for people who do not know electronics as there is no access to high voltages etc.

All you have to do is to clamp the current sensor around one of the wires where the current flows. Note if you clamp the both wires you will not measure anything as the current flow from one wire will neutralize the current flow from the other wire and the sum will be always 0.


The sensor easily clamps around the current flow wire:


On the other end the sensor have 3.5 mm audio jack where you can plug in mating connector and connect to Arduino.

As any other transformerSNS-CURRENT-CT013-100A has primary and secondary windings, the ratio is 100:0.05 i.e. when 100A flow through primary 1 turn wire the secondary coil will have 50mA.

The current transformers must always have burden resistor connected to the second coil, the purpose is to measure the voltage drop on this resistor which will be proportional to the input current. This burden resistor value also should be low enough to prevent core saturation.

Safety: Current transformers should never operate without burden resistor, as if left open very high voltage may generate through second winding which to cause sparking. So never use this sensor without connecting it to proper circuit with burden resistor!

ConnectingSNS-CURRENT-CT013-100A to Arduino is well explained here. We have nothing to add. Based on same setup we tested the emon library and it works perfectly.

We used for our setup OLIMEXINO-32U4 + MOD-LCD3310 and breadboard where two 10K 1% resistors + 10 uF capacitor make the bias circuit to the sensor with 33 ohm 1/4W 1% burden resistor connected.


For device under test we used toaster and we clamped one of the heater wires:


The Arduino code is quite simple:

#include "lcd3310_GPIO.h"
#include <math.h>
#include "EmonLib.h"

EnergyMonitor emon1;
String toPrint1, toPrint2;
double Irms, thePower;
char buffer1[30], buffer2[30];

void setup()
 emon1.current(1, 111.1);  //pin for current measurement, calibration value
 pinMode(8, OUTPUT);   //enable UEXT power supply
 digitalWrite(8, LOW);
 LCDInit();   //initialize LCD display
 LCDContrast (0xFF);

void loop()
 Irms = emon1.calcIrms(1480); // measure current
 thePower = Irms*230.0;   // we assume voltage is 230VAC if you add transformer to connect to other input you can measure real voltage too

 toPrint1 = "Power:" + String((int)thePower) + "." + String(((unsigned int)(thePower*100))%100) + " ";
 toPrint2 = "Current:" + String((int)Irms) + "." + String(((unsigned int)(Irms*100))%100) + " ";
 toPrint1.toCharArray(buffer1, 30);
 toPrint2.toCharArray(buffer2, 30);
 LCDStr(0, (unsigned char *) buffer1, 0);
 LCDStr(2, (unsigned char *) buffer2, 0);
 LCDUpdate();   // print power and current

as you see emon library is very easy to use, so with just few component andSNS-CURRENT-CT013-100A you can easily monitor your home power consumption, log it to the cloud with ESP8266 for instance etc.

When the toaster is switched on the power is displayed:


If you look at the first picture when the toaster is not switched on there is still some 0.012A displayed and fake 28 W energy registered, this is just noise on ADC input. The easiest way is to filter this noise in software and if energy is less 30W to ignore it.

11 Comments (+add yours?)

  1. Dobril Dobrilov
    Jan 27, 2016 @ 18:47:53

    Any idea why we get double value than showed value on Clamp Meters ?


  2. R Sternschulte
    Mar 20, 2016 @ 23:04:34

    It can be if the voltage and current are not in phase. This is typical for inductive loads (transformers and motors) or if there are several current frequencies on the cable (harmonics of 50 Hertz ac frequency) which is typical for switsching power supplies or motor inverters


  3. Laurance
    Oct 09, 2016 @ 11:21:14

    What hardware would I need to add to monitor voltage if any? Can I use P=I*E in the code to have voltage displayed on the LCD screen and skip the hardware?


  4. laurance
    Oct 10, 2016 @ 02:14:50

    What could I add to the code to display voltage values? Would that require any extra hardware?


  5. akmal
    Nov 24, 2016 @ 15:50:55

    #include “lcd3310_GPIO.h”
    #include “EmonLib.h”

    where can i get this code?


  6. RBay
    Aug 12, 2017 @ 12:55:39

    Would it be possible to tell if the device is either on or off with the clamp sensor around the whole cable ie. all wires inside the clamp? I know this is not the intention, but I would like to detect current for my hall lights without any intrusion to my current wiring. Any thoughts?


  7. fadhilrashid
    Dec 04, 2017 @ 16:10:23

    Can I have the schematic circuit? Help me. Thanks a lot.


  8. banyu tresno
    May 05, 2018 @ 09:04:06

    May I know the installation wire for the clamp amphere?


  9. kooroshi60Ciro
    Mar 05, 2019 @ 22:44:10

    Would you please change the code to work with 16X2 LCD?
    Thank you!


  10. Deepak Manghani
    Jun 11, 2019 @ 16:51:14

    unable to locate “lcd3310_GPIO.h”


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: