Energy monitor values

I have assembled the monitor according to OpenEnergyMonitor but weird values showed up on the console even tough nothing was connected.

Here’s the schematic: http://bit.ly/1uW0Pa8

I’m using a Talema ASM-030 CT and a 230V->9V AC-AC transformer.

Here’s the code from emonLib:

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

void setup()
{  
  Serial.begin(9600);
  
  emon1.voltage(2, 234.26, 1.7);  // Voltage: input pin, calibration, phase_shift
  emon1.current(1, 111.1);       // Current: input pin, calibration.
}

void loop()
{
  emon1.calcVI(20,2000);         // Calculate all. No.of half wavelengths (crossings), time-out
  emon1.serialprint();           // Print out all variables (realpower, apparent power, Vrms, Irms, power factor)
  
  float realPower       = emon1.realPower;        //extract Real Power into variable
  float apparentPower   = emon1.apparentPower;    //extract Apparent Power into variable
  float powerFActor     = emon1.powerFactor;      //extract Power Factor into Variable
  float supplyVoltage   = emon1.Vrms;             //extract Vrms into Variable
  float Irms            = emon1.Irms;             //extract Irms into Variable
}

What am I missing?

energy.JPG

they look pretty good to me!

What do you mean? Hundreds?

Hi,

I have assembled the monitor according to OpenEnergyMonitor but weird values showed up on the console even tough nothing was connected.

With noting connected you have open circuit inputs, they are high impedance and are what is called floating, until you connect your devices to them. They are without any connection like an antenna reacting to any charge in the air.

Connect your sensors and gear and it will overcome the phenomenon.

Tom..... :)

Have you done the calibration?
http://openenergymonitor.org/emon/buildingblocks/calibration

The guide from OpenEnergyMonitor misinformed regarding the CT. The one mentioned had an output of max 50 mV (SCT-013-000) and that made me purchase a similar CT (ASM-030) which isn't good. A reply on their forum stated a different CT (SCT-013-030) which as an output of max 1V, 20 times the value from the first.

A post from Arduino forum stated someone used an ACS-712 to measure current on a 230V line. This is the part I'm not geting. I tought the ACS has a limit of max. 30V.

What's going on?

The AX-1500 CT just arrived, which is similar to the CT from the guide, and I installed it right away. The problem now is the output. As you can see in the sample below, the output is very strange when a 40W light bulb is plugged. The real power output varies very much and that's because the power factor isn't calculated properly.

23.60 40.43 225.75 0.18 0.58 18.56 39.68 225.86 0.18 0.47 18.60 31.05 226.06 0.14 0.60 26.53 44.05 226.04 0.19 0.60 17.09 37.55 226.12 0.17 0.46 21.40 39.49 225.80 0.17 0.54 22.15 42.95 225.82 0.19 0.52 14.70 36.09 226.27 0.16 0.41 23.15 40.45 226.17 0.18 0.57 18.87 40.02 225.94 0.18 0.47 17.83 37.27 226.16 0.16 0.48 25.09 42.76 226.92 0.19 0.59

I don't know the source of the problem. I checked the EmonLib.cpp and I still can't figure it out. I have to mention I added abs() to the realpower and power factor in the EmonLib.cpp file. It kept reading negative.

Help!

A current transformer need an amplifier (opamp) to crank up the voltage to something the Arduino can read. Post a picture of that. The ACS can be connected to the Arduino directly. Don't know were you get the 30volt from. Other direct coupled high-side sensors (battery monitors) have voltage limits like that. This ACS712 is an isolated hall sensor with 2.1Kv isolation. Don't know if that's legal/high enough in your country. If I have done the calculations right, the 30A board will have a ~10watt resolution per digital step. This all migh have nothing to do with your readings. Also post a picture/schematic/resistor values of your voltage sensor. Leo..

The power factor is essential so, the ACS not supplying a waveform, I wouldn't use it. I'm using the AX-1500 CT from Talema.

As for the voltage output, I'm using a devided 9V output from an AC-AC transformer.

I asked for a circuit diagram to check if you have interfaced the devices you mentioned properly with the Arduino. The current transformers you use might need amplification and midpoint voltage lifting. I also don't know how you have connected the 9voltAC transformer to the Arduino. Voltage divider values, 2.5volt midpoint, ?? AFAIK the ACS is outputting a waveform. At zero current, the bias voltage is half of the supply. Leo..

edit: Just saw the link to the breadboard layout.

The ACS might be having a desired output, but I read that it’s sensitive to el.-mg. fields. I’m using a 9V transformer and that’s one source of EM waves and it could affect the reading. I wish I could use it but I’m not sure what’s the minimum it can read.

Anyway, here’s my assembly: ImageBam

What value are the two resistors on the voltage transformer. They are not 10k/100k as on the schematic.

What are the voltages on the two analogue inputs, measured with a DMM. They must be 2.5volt. Exactly half of the Arduino's 5volt supply. Leo..

Wawa: What value are the two resistors on the voltage transformer. They are not 10k/100k as on the schematic.

What are the voltages on the two analogue inputs, measured with a DMM. They must be 2.5volt. Exactly half of the Arduino's 5volt supply. Leo..

They are not. The output of the transformer is a lot higher than specified. About 14.5V. The voltages are not exactly 2.5V, but are in range.

Offtopic: before finding the OpenEnergyMonitor project, I was considering using a special energy measurement IC which does just that, one you'll find in adapter sockets which have an energy monitor built in. I've put too much effort in finding how to use them. I got angry and searched for alternatives like the project we're reviewing now.

Is there a way to link one of these special ICs with Arduino? There must be, but too much hastle.

What do you mean with "in range". They must be exactly half of Arduino's supply. Regardless of current/voltage info from the sensors.

14.5volt from a 9volt transformer is good. That means a transformer with bad regulation. Good for this project. 20.5volt top, 2.5volt midpoint, 100k/10k is perfect. You will have to adjust the maths in the program if you have used a different transformer... Leo..

Voltage varies depending on the appliance and the grid. How do I maintain a 2.5V output? Through a regulator?

That 2.5volt mid-voltage is made from Arduino's 5volt rail with two 10k resistors. One set for the voltage sensor, and one set for the current sensor. If Arduino's 5volt line is stable, the 2.5volt should be stable. The sensor results (AC current/voltage) are superimposed onto that mid-voltage. So if you measure the analogue pin with a DMM, you should always see 2.5volt DC.

How did you supply the Arduino. USB or 9volt on the DC jack. A stable 5volt on the micro is important. Leo..

It's either by USB or the Vin pin.

USB from a computer or laptop. > 5volt depends on the computer.

Vin is pre onboard regulator, and has to be at least 6.6volt. Less than 6volt, and the regulator drops out of regulation. Leo..

Mine is a Yun and the max on the Vin is 5V.

not sure if I am seeing the voltage reference part correctly.

http://openenergymonitor.org/emon/buildingblocks/how-to-build-an-arduino-energy-monitor

are you trying to measure the mains ? or the voltage across the coil of the relay after the load ?