Energy Functions returning zero
Hello Sir
I am currently working on a project of computing energy in a 3 phase system. For this, I am using ATM90E36 IC along with ESP32.
Your .ino code has been really helpful in computing most of the essential parameters and I'd like to thank you for sharing the code on Git.
However, I am facing an issue with 2 functions, eic.GetImportEnergy() and eic.GetExportEnergy(), for which the output is showing as 0(zero).
Can you please guide me why this is happening and what changes should I make in code to get real-time energy readings? I am attaching .ino file and screenshot of the output for your reference. I am only using one phase for time being to test my hardware and software.
Another thing, I have to multiply current by a factor of 6.83 to get the actual value. I came up with 6.83 factor by comparing it with a calibrated meter. So my 2nd query is whether there is a provision to compute the actual current without the need to tweak it by multiplying with 6.83?
I am using 120A-40mA Split Core Current Transformer to sense current. The hardware circuit that I've used on CT side is same as mentioned in the ATM90E36 Application note. I am attaching PDF of the circuit layout I've used for your reference.
I would really appreciate if you could help me solve the issues I am facing. Let me know if you need any more information from my end
atmel_current_application_note.pdf
arduino_code.txt
Hi, the library cannot account for the exact CT and multiplier resistors you use so setting the current multiplier is a required activity. The zero power readings indicate something else wrong with your current measurement setup. Please use a scope to probe the sinusoid via the CT arriving at the ADC's of the energy monitor ASIC.
Hi, the library cannot account for the exact CT and multiplier resistors you use so setting the current multiplier is a required activity. The zero-power readings indicate something else wrong with your current measurement setup. Please use a scope to probe the sinusoid via the CT arriving at the ADC's of the energy monitor ASIC.
Hello Sir Firstly, thanks for your prompt response. Just so you know, the power and current readings generated from IC looks pretty accurate. The issue I am facing is with energy and not power or current. Energy values obtained from ATMEL IC is always 0.000 (Zero).
I am using a resistive heater, of 1kW. The power consumed by the heater is being correctly calculated and displayed. Same goes for current, However, GetImportEnergy() and GetExportEnergy() are returning zero values when it should have ideally returned around 0.16kW after 5 mins of heater usage. Can you assist me with this?
Check that all the Checksum values are correctly calculated and saved. According to the datasheet metering will stop if the saved checksum value and the calculated value by the IC do not match. Other values will still update like the voltage and current measurements. Here is the information from the application note:
When '8765H' is written, the registers do not resume to their power-on values, but checksum will be checked. If the written checksum is the same as the system self generated checksum, normal metering/measurement functions will be started. If they are different, metering/measurement functions will not be started, the corresponding CSxErr bits are set and the WarnOut pin outputs high level. Note that if CS2 is not correct, when the startup register (xxxStart) is 8765H, only harmonic measurement and metering functions will be disabled. But if CS0, CS1 or CS3 are not correct, all measurement and metering functions will be disabled.
Hi, I also had the same problem & it started worked after removing line 494 in "ATM90E36.cpp". Seems it is resetting the register values to default.
Hi, I also had the same problem & it started worked after removing line 494 in "ATM90E36.cpp". Seems it is resetting the register values to default.
Hey Neel,
Could you elaborate further to get the energy reading?
You can send me the details here [email protected]
Thanks in advance MK
You need to do the following to read the energy register values. You need to do the following:
- Supply the three-phase power to the measurement board
- Run the program through Arduino
- As you are getting zero values in the energy register, try to check the CS0 and CS register value of your dumped program. (a) Read all register values using "eic.dumpAllRegs();" (b) Note down the CS0 and CS1 registers values
- Go to CPP file from the library and replace the CS0 and CS1 resister values with the noted ones. Example: CommEnergyIC(WRITE, CSOne, 0xXXXX); // Checksum 1
- Hope this helps
Hi, the library cannot account for the exact CT and multiplier resistors you use so setting the current multiplier is a required activity. The zero-power readings indicate something else wrong with your current measurement setup. Please use a scope to probe the sinusoid via the CT arriving at the ADC's of the energy monitor ASIC.
Hello Sir Firstly, thanks for your prompt response. Just so you know, the power and current readings generated from IC looks pretty accurate. The issue I am facing is with energy and not power or current. Energy values obtained from ATMEL IC is always 0.000 (Zero).
I am using a resistive heater, of 1kW. The power consumed by the heater is being correctly calculated and displayed. Same goes for current, However, GetImportEnergy() and GetExportEnergy() are returning zero values when it should have ideally returned around 0.16kW after 5 mins of heater usage. Can you assist me with this?
I am also facing the same issue , did you resolved it any other way ???