EmonLib. h library question

Greetings,

I just found this library and I would like to use it to measure current through an ACS712. The problem I have is I don't know what kind of calibration the setup call requires

emon1.current(1, 111.1); // Current: input pin, calibration.

What is 111.1 ??

Thank you, MaLi

I guess you are talking about the OpenEnergyMonitor ? This is the website : http://openenergymonitor.org This is the github for EmonLib : https://github.com/openenergymonitor/EmonLib This is the page for calibration with the number "111.1" : http://openenergymonitor.org/emon/buildingblocks/calibration

The number is for the "CT", the Current Transformer. I don't know what number you need for ACS712.

Olá Senhores. Estou montando um projeto para medição de um circuito trifásico. No código eu abro 3 instâncias de medição. Quando visualizo no monitor serial, os valores de potência real e fator de potência estão muito diferentes. Estou testando com um motor trifásico, com um amperímetro já da pra ver que o mesmo não está balanceado, porém os valores das potências estão muito fora do normal. Com relação a potência aparente, tensão e corrente estão bem próximos. A alimentação do arduino está pela USB. Há algo que possa estar errado?

// EmonLibrary examples openenergymonitor.org, Licence GNU GPL V3

include "EmonLib.h" // Include Emon Library

EnergyMonitor emon1; // Create an instance EnergyMonitor emon2; // Create an instance EnergyMonitor emon3; // Create an instance

void setup() { Serial.begin(9600);

emon1.voltage(5, 190, 1.7); // Voltage: input pin, calibration, phase_shift emon1.current(8, 65); // Current: input pin, calibration. emon2.voltage(6, 190, 1.7); // Voltage: input pin, calibration, phase_shift emon2.current(9, 65); // Current: input pin, calibration. emon3.voltage(7, 190, 1.7); // Voltage: input pin, calibration, phase_shift emon3.current(10, 65); // Current: input pin, calibration. }

void loop() { Serial.println ("---------------------------------------------------------------------"); 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 realPowerL1 = emon1.realPower; //extract Real Power into variable float apparentPowerL1 = emon1.apparentPower; //extract Apparent Power into variable float powerFActorL1 = emon1.powerFactor; //extract Power Factor into Variable float supplyVoltageL1 = emon1.Vrms; //extract Vrms into Variable float IrmsL1 = emon1.Irms; //extract Irms into Variable

Serial.println ("---------------------------------------------------------------------"); emon2.calcVI(20,2000); // Calculate all. No.of half wavelengths (crossings), time-out emon2.serialprint(); // Print out all variables (realpower, apparent power, Vrms, Irms, power factor)

float realPowerL2 = emon2.realPower; //extract Real Power into variable float apparentPowerL2 = emon2.apparentPower; //extract Apparent Power into variable float powerFActorL2 = emon2.powerFactor; //extract Power Factor into Variable float supplyVoltageL2 = emon2.Vrms; //extract Vrms into Variable float IrmsL2 = emon2.Irms; //extract Irms into Variable

Serial.println ("---------------------------------------------------------------------"); emon3.calcVI(20,2000); // Calculate all. No.of half wavelengths (crossings), time-out emon3.serialprint(); // Print out all variables (realpower, apparent power, Vrms, Irms, power factor)

float realPowerL3 = emon3.realPower; //extract Real Power into variable float apparentPowerL3 = emon3.apparentPower; //extract Apparent Power into variable float powerFActorL3 = emon3.powerFactor; //extract Power Factor into Variable float supplyVoltageL3 = emon3.Vrms; //extract Vrms into Variable float IrmsL3 = emon3.Irms; //extract Irms into Variable Serial.println ("---------------------------------------------------------------------"); }