Comunicación SPI ATM9E32AS Energy Meter

For discussions related to emonPi, emonTx, emonBase and emonGLCD hardware and Arduino firmware

Actualmente estoy desarrollando mi trabajo de grado y pasantía en medición de consumo energético en la Industria Licorera del Cauca, Colombia. En el proceso opté por desarrollar el medidor inteligente bajado en el chip ATM90E32AS, se fabricaron la placas para la versión TC (Transformadores de corriente) tal y como lo platea Atmel en su nota de aplicación 3P4W.

Utilizo una ESP32 para extraer los datos mediante la comunicación SPI, logré crear conexión entre el chip y la ESP32 y realizar las operaciones de lectura y escritura, pero antes de abordar el tema de medición intento leer la temperatura del chip para corroborar para validar los datos; Al momento de solicitar el valor del la temperatura al chip (Dirección 0xFC) este me regresa un valor de -256.

Alguien con más experiencia en el tema me puede ayudar?
En que estoy fallando?
Debo considerar algo más?

Cualquier información la apreciaré demasiado.

This project uses the ESP32 to talk SPI to that energy IC and is opensource. You might want to check out the source here for any tips.

The creator also hangs out in this forum a bit too, so might be able to help.

Muchas gracias por la información.

@dBC I’ve been watching the different links that you share me, There are interesting things for learn, Also saw that you’re an expert with ATM90E32AS and other things about this, I would like to share my design and my source code with you, maybe you can help me please! Just I need to create an correct communication SPI with the chip for finish my tesis.

I need to get the next data from ATM90E32AS:

  • Voltage: Phase A,B,C
  • Current: Phase A,B,C
  • Active Energy
  • Reactive Energy
  • Total Energy
  • Power Factor
  • Temperature

I’m going to send you some pictures about the design, code, and logic analyzer (saleae).

I don’t know becouse in the moment that ask the temperature from chip, I get the number -256.

Imagen%201

Code.txt (22.9 KB)

I’m more an ADE man sorry. Apart from a fairly cursory read of the datasheet I don’t know much about this device at all. @jdeglavina is our local expert on that device, and on ESP32 SPI.

I responded to @Nelson_Eduardo_Gueva via email, and I believe this is a hardware issue. I ran his code on one of my meters, and it seemed to work without issue.

1 Like

Yes, It’s correct! I changed my chip on my PCB and now my meter working without problem. Thanks @jdeglavina for your tips and disposition.

Do you mean the ATM90E32AS had failed?

Yes, maybe the ATM90E32AS was defective! @dBC