ATM90E26_Arduino icon indicating copy to clipboard operation
ATM90E26_Arduino copied to clipboard

Voltage Sampling Issue

Open sdk694 opened this issue 3 years ago • 10 comments

Hi ,

I am using your code to interface ATM90-E26 with ESP8266. Ran the default code without any calibration and got this output, the output should be around 230V but I am getting 0.03V. The circuit that I have implemented is attached, The jack gives an output of 12vac and Vp is measure across r2 which is fed to the ATM and the ATM is powered externally with 3.3 V adapter. Any suggestions?

2

img1 with a 3.3V adapter.

sdk694 avatar Apr 03 '21 20:04 sdk694

Please supply the full schematic or compare it to the ATM90E26 Featherwing for reference. It may also be a good idea to buy/make the featherwing design yourself for a complete reference before jumping into a full custom design. The issue here seems to be lack of connection between VP and the ASIC voltage measurement pins. Need to see the full schematic and PCB / Breadboard assembly to be sure. Could be something as simple as a dry joint on the barrel jack.

whatnick avatar Apr 03 '21 21:04 whatnick

I have used UART for communication, following are the connections that I have made USEL - S.C with 3.3 - (UART) MMDO - S.C with 3.3 MMD1- S.C with GND and have connected the CT to I1 and I1P . I have provided the schematic SS and the PCB's photograph for your reference.

IMG-20210404-WA0006 IMG-20210404-WA0005 IMG-20210404-WA0004 IMG-20210402-WA0019

sdk694 avatar Apr 04 '21 08:04 sdk694

Hi thanks for the additional info. The issue seems to be unpopulated R1/R2 resistors in the PCB , which means no voltage is getting to the energy monitor except whatever the FR4 resistance and capacitance coupling is getting to it. To verify please use a multi-meter to check the voltage at the VP test point.

Populate the 1k / 100k voltage divider ladder and try again.

whatnick avatar Apr 04 '21 08:04 whatnick

Thank you. I made the corrections that you suggested. Now I am getting the Voltage as 112.25 V. The voltage should be around 230V. I have connected a Blub to the CT and its giving current as 0.01. Any suggestions?

IMG_20210404_155739

sdk694 avatar Apr 04 '21 10:04 sdk694

Since some voltage is being sampled it is time to perform calibrations. Please see docs here : https://github.com/whatnick/ATM90E26_Arduino/tree/master/docs . TL;DR your options are to change your voltage divider ladder resistors or calibration registers to get the actual values.

whatnick avatar Apr 04 '21 12:04 whatnick

I tried to change the Ugain value using the excel sheet that was present on the repository. Once the changes were uploaded the voltage was coming out to be 0.

sdk694 avatar Apr 04 '21 20:04 sdk694

Did you read all of the docs and update the CRC values ? What do the status registers say. Please lodge some consulting time with me. Unfortunately this is the limit of open-source support I can offer. The mistakes with missing voltage divider ladder were easily avoided. Would you like to give me some idea of your technical background so that I can tune my support appropriate level of assumed knowledge.

whatnick avatar Apr 04 '21 23:04 whatnick

@sdk694 I am having the same problem too. Used 1k / 100k. Showing voltage of 142V AC. The difference with you is I am using SPI. If you already solved it please let me know by commenting

PadmaIoT avatar Jul 10 '23 03:07 PadmaIoT

The code is indicative only for a sample setup I had at the time. Please use calibration parameters to get the value you require. Chips may differ in internal resistance and voltage divider ladder resistors and supplies like transformers and even direct AC have their own internal resistance.

On Mon, 10 July 2023, 13:08 PadmaErfan, @.***> wrote:

@sdk694 https://github.com/sdk694 I am having the same problem too. Used 1k / 100k. SShowing voltage of 142V AC. The difference with you is I am using SPI

— Reply to this email directly, view it on GitHub https://github.com/whatnick/ATM90E26_Arduino/issues/29#issuecomment-1628058942, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADX7BE5BX656HGAVECAJTLXPN2MVANCNFSM42KSR4CQ . You are receiving this because you commented.Message ID: @.***>

whatnick avatar Jul 10 '23 23:07 whatnick

I changed the Ugain according to the actual & measured voltage for calibration (from the Excel sheet). I am trying to find the answers. Let me describe What I understood and what I did.

ATM90E26_Breakout_usage (1) According to this picture, My understanding: there are two 10-ohm resistors connected. One is in series with 12v AC transformer output & Vn pin and the GND, VP & another output point of the transformer are connected together. The other one is connected across I1p & I1N. Result: The voltage across Vn & Vp pins shows a voltage of almost 3V( in datasheet the highest voltage could be 600mVrms from 120uVrms,the lowest). So the chip gives me 655.35V. From the datasheet, it is found that the 49H register description says "Data format is XXXX.X pulses. which corresponds to 0~655.35V." Action: I switched to ladder config, and found the measured voltage from the serial monitor is around 142V AC. Result: I used the Excel sheet and adjusted the Ugain in .cpp. Then voltage shows nearly 122 to 127 v AC.

I am sure there is a problem that results in the chip isn't configured well. If you find any problem in my configs I will request you to mention it so that I can solve it. @whatnick

N: B I have used the same PCB design from GitHub (the green module in my comment picture)

PadmaIoT avatar Jul 11 '23 06:07 PadmaIoT