whatnick / atm90e36_arduino Goto Github PK
View Code? Open in Web Editor NEWArduino library for interfacing communicating with the ATM90E36 poly-phase metering AFE
Arduino library for interfacing communicating with the ATM90E36 poly-phase metering AFE
no matching function for call to 'ATM90E36::ATM90E36(int)'
Hi,
Nice Work. Appreciate it. Just wondering about how to fetch DFT and THD from this chip.
Thanks
Hello,
In SPI/ Normal mode (DMA -> Low / PM0,PM1 -> High), I am getting all 1's from all the registers.
I tried it with a couple of different ATM90E36A boards.
Please guide me, what may have gone wrong.
Thank You in Advance!
Here is the snap from Serial Monitor for a better understanding of the problem.
S0:0xffff
S1:0xffff
E0:0xffff
E1:0xffff
VA:655.35V
VB:655.35V
VC:655.35V
IA:65.54A
IB:65.54A
IC:65.54A
f655.35Hz
I'm using a CT 100A/50ma, but in the real world with my tests it doesn't exceed 65.5A.
Would you be able to help me?
Hii Dhar,
I am working on interfacing of ATM90E36 with ESP32. As per the your library, interfacing was successfully carried out. However, while reading the data (only three phase voltage and frequency), some of data getting missed and showed zero.
Data as follows:
21:02:44.123 -> VA:249.04V
21:02:44.123 -> VB:249.60V
21:02:44.123 -> VC:249.36V
21:02:44.123 -> IA:0.00A
21:02:44.123 -> IB:26.41A
21:02:44.123 -> IC:0.00A
21:02:44.157 -> f49.90Hz
21:02:45.142 -> S0:0x0
21:02:45.142 -> S1:0x0
21:02:45.176 -> E0:0x3466
21:02:45.176 -> E1:0x0
21:02:45.176 -> VA:249.16V
21:02:45.176 -> VB:249.72V
21:02:45.176 -> VC:249.48V
21:02:45.176 -> IA:0.00A
21:02:45.176 -> IB:0.00A
21:02:45.176 -> IC:0.00A
21:02:45.210 -> f49.90Hz
21:02:48.334 -> S0:0x0
21:02:48.334 -> S1:0x0
21:02:48.368 -> E0:0x0
21:02:48.368 -> E1:0x0
21:02:48.368 -> VA:249.26V
21:02:48.368 -> VB:249.82V
21:02:48.368 -> VC:249.58V
21:02:48.368 -> IA:0.00A
21:02:48.368 -> IB:0.00A
21:02:48.368 -> IC:0.00A
21:02:48.402 -> f49.90Hz
21:02:49.389 -> S0:0x0
21:02:49.423 -> S1:0x0
21:02:49.423 -> E0:0x0
21:02:49.423 -> E1:0x0
21:02:49.423 -> VA:249.28V
21:02:49.423 -> VB:249.85V
21:02:49.423 -> VC:249.61V
21:02:49.423 -> IA:0.00A
21:02:49.457 -> IB:0.00A
21:02:49.457 -> IC:0.00A
21:02:49.457 -> f49.91Hz
21:02:50.475 -> S0:0x0
21:02:50.475 -> S1:0x0
21:02:50.475 -> E0:0x0
21:02:50.475 -> E1:0x0
21:02:50.475 -> VA:249.26V
21:02:50.508 -> VB:249.82V
21:02:50.508 -> VC:249.58V
21:02:50.508 -> IA:0.00A
21:02:50.508 -> IB:0.00A
21:02:50.508 -> IC:0.00A
21:02:50.508 -> f49.91Hz
21:02:51.527 -> S0:0x0
21:02:51.527 -> S1:0x0
21:02:51.527 -> E0:0x55
21:02:51.561 -> E1:0x0
21:02:51.561 -> VA:249.16V
21:02:51.561 -> VB:249.72V
21:02:51.561 -> VC:249.48V
21:02:51.561 -> IA:0.01A
21:02:51.561 -> IB:0.00A
21:02:51.561 -> IC:0.00A
21:02:51.595 -> f49.91Hz
21:02:54.720 -> S0:0x0
21:02:54.720 -> S1:0x0
21:02:54.720 -> E0:0x0
21:02:54.754 -> E1:0x0
21:02:54.754 -> VA:249.12V
21:02:54.754 -> VB:249.69V
21:02:54.754 -> VC:195.56V
21:02:54.754 -> IA:0.00A
21:02:54.754 -> IB:0.00A
21:02:54.754 -> IC:0.00A
21:02:54.788 -> f0.00Hz (here frequency missed)
21:02:55.774 -> S0:0x0
21:02:55.774 -> S1:0x0
21:02:55.809 -> E0:0x0
21:02:55.809 -> E1:0x0
21:02:55.809 -> VA:249.03V
21:02:55.809 -> VB:0.00V (here voltage missed)
21:02:55.809 -> VC:0.00V (here frequency missed)
21:02:55.809 -> IA:0.00A
21:02:55.809 -> IB:0.00A
21:02:55.809 -> IC:0.00A
21:02:55.842 -> f49.91Hz
21:02:56.826 -> S0:0x0
21:02:56.860 -> S1:0x0
21:02:56.860 -> E0:0x0
21:02:56.860 -> E1:0x0
21:02:56.860 -> VA:249.03V
21:02:56.860 -> VB:249.59V
21:02:56.860 -> VC:249.35V
21:02:56.894 -> IA:0.00A
21:02:56.894 -> IB:0.00A
21:02:56.894 -> IC:0.00A
21:02:56.894 -> f0.00Hz (here Frequency missed)
1:02:56.826 -> S0:0x0
21:02:56.860 -> S1:0x0
21:02:56.860 -> E0:0x0
21:02:56.860 -> E1:0x0
21:02:56.860 -> VA:249.03V
21:02:56.860 -> VB:249.59V
21:02:56.860 -> VC:249.35V
21:02:56.894 -> IA:0.00A
21:02:56.894 -> IB:0.00A
21:02:56.894 -> IC:0.00A
21:02:56.894 -> f0.00Hz (here Frequency missed)
21:02:57.913 -> S0:0x0
21:02:57.913 -> S1:0x0
21:02:57.913 -> E0:0x0
21:02:57.947 -> E1:0x0
21:02:57.947 -> VA:0.00V (here voltage missed)
21:02:57.947 -> VB:19.03V (here voltage missed)
21:02:57.947 -> VC:0.00V (here voltage missed)
21:02:57.947 -> IA:0.00A
21:02:57.947 -> IB:0.00A
21:02:57.947 -> IC:0.00A
21:02:57.947 -> f0.00Hz
21:02:58.965 -> S0:0x0
21:02:58.965 -> S1:0x0
21:02:58.999 -> E0:0x0
21:02:58.999 -> E1:0x0
21:02:58.999 -> VA:0.00V (here voltage missed)
21:02:58.999 -> VB:0.00V (here voltage missed)
21:02:58.999 -> VC:0.00V (here voltage missed)
21:02:58.999 -> IA:0.00A
21:02:58.999 -> IB:0.00A
21:02:58.999 -> IC:0.00A
21:02:59.033 -> f49.91Hz
21:03:00.018 -> S0:0x0
21:03:00.052 -> S1:0x0
21:03:00.052 -> E0:0x4000
21:03:00.052 -> E1:0x0
21:03:00.052 -> VA:321.65V
21:03:00.052 -> VB:249.59V
21:03:00.052 -> VC:249.35V
21:03:00.052 -> IA:0.00A
21:03:00.052 -> IB:0.00A
21:03:00.086 -> IC:0.00A
21:03:00.086 -> f5.12Hz (here Frequency wrong value missed)
21:03:01.106 -> S0:0x0
21:03:01.106 -> S1:0x0
21:03:01.106 -> E0:0x0
21:03:01.106 -> E1:0x0
21:03:01.106 -> VA:0.00V (here voltage missed)
21:03:01.106 -> VB:0.00V (here voltage missed)
21:03:01.140 -> VC:288.52V
21:03:01.140 -> IA:0.00A
21:03:01.140 -> IB:0.00A
21:03:01.140 -> IC:0.00A
21:03:01.140 -> f49.91Hz
and its repeating as cycle but most of time we are able to get the value but only some time it is missing.
Could you help me out to rectify this issue?
Thanks in Advance!
Hi,
I am using ATM90E36A Development Kit with Nodemcu and tried your Code with following connections
D5-SCK
D6-MISO
D7-MOSI
D3-SS
(I didn't have adafruit board so tried with above connections on NodeMCU)
and the Output is something like
S0:0x2000
S1:0x6c01
E0:0x7f00
E1:0x2370
VA:2.55V
VB:5.14V
VC:82.54V
IA:0.11A
IB:37.38A
IC:3.65A
f:0.55Hz
S0:0x20ff
S1:0xf002
E0:0xf600
E1:0x3f0
VA:0.01V
VB:350.78V
VC:46.44V
IA:2.82A
IB:3.07A
IC:25.12A
f:4.74Hz
S0:0x6030
S1:0xf100
E0:0x2040
E1:0xf038
VA:9.60V
VB:17.93V
VC:145.90V
IA:0.25A
IB:46.85A
IC:47.37A
f:16.63Hz
S0:0x800f
S1:0x780e
E0:0xe003
E1:0x7f00
VA:10.08V
VB:574.71V
VC:528.64V
IA:65.53A
IB:0.45A
IC:53.12A
f:160.12Hz
S0:0x1bb0
S1:0x6f03
E0:0x11c
E1:0x31
VA:71.04V
VB:291.44V
VC:165.27V
IA:57.36A
IB:33.28A
IC:0.03A
f:5.13Hz
I am not able to trace these random value.
I also pulled high PM0,PM1, but results are same.
Is it because I didn't calibrated device?
Is there any video or document to calibrate device?
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,
I am trying to use YHDC SCT 013-100 CTs with ATM90E36 but having no succes caliberating it. The output is 50mA with turn ratio 2000:1. Previously I have used these clamp CTs and have caliberated them, these are working fine. I am using the same method as suggested by the datasheet. However, the value of register that I get upon my calculation increases way beyond 65000. What am I doing wrong?
Can anyone please help me with this?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.