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.

New Product in Stock: Bluetooth 4.0 BLE module


MOD-nRF8001 is a low cost EUR 9.95 Bluetooth low energy module (Bluetooth 4.0) which works with Arduino, Pinguino, Maple boards. Demo examples for these three platforms have been tested.

BLE is interesting for iPhone developers since BLE is not subject to a bogus license from Apple as normal Bluetooth, this means you can connect devices to iPhone via BLE without the need to be “approved” by Apple. Other phones and tablets with Bluetooth 4.0 also can work with MOD-nRF8001. This makes interfacing to sensors and physical computing possible at low cost. MOD-nRF8001 has a range of up to 50-60 meters when no obstacles and walls are present.

MOD-nRF8001 is made for easy integration to existing PCBs and can be soldered on the PCB using the cut-through pads, those who want to work with breadboards can solder 2 x 0.1″ step connectors to MOD-nRF8001 and plug it to a breadboard, the third way to connect MOD-nRF8001 to board is by soldering 10 pin UEXT connector to it.

Special OLIMEXINO-NANO nRF8001 shield is designed and will be in stock in February.

New Product in stock: OLIMEXINO-NANO wearable Arduino Leonardo clone


In October I blogged for our new Arduino clone: The NANO with size only 30x30x8 mm.

Well we have them all three in stock now!

OLIMEXINO-NANO is the core module with USB micro connector, the stackable connectors for shields and UEXT to connect our many UEXT modules like BMP085, MPU6050, HMC5883L, Zigbee, temperature, magnetometers etc. etc.

OLIMEXINO-BB is stackable shield which allow you to connect NANO to Breadboard-1

OLIMEXINO-BAT is shield which contain Lithium 3V battery, connector for LiPo battery and on board charger.

The power supply for NANO is made very intelligently and as soon you connect LiPo it will take power from there, if the USB is connected the batteries are disconnected and start charging them.

We have two more modules which will be ready in few weeks:

  • EUR 10 Bluetooth 4.0 BLE shield which will allow the wearable NANO to be connected to iPhones without licensee issues or to Android phones with Bluetooth 4.0 and will allow interactions with phones and tablets with different sensors connected to NANO
  • EUR 22 GSM/GPRS 4 band shield with external antenna which will add connectivity via GSM

The NANO shield concept is that the connectors are SMT type and stackable, on bottom there is male connector, on top is female connector so you can stack as many shield as you want together.