Arduino Yun / SPI Problem / Power Measuring CS5463

I changed to a new version of code with more register writes.
The writing process seems totally fine in the LA.

I can read out the same register values as long as I only read one register and comment out everything else, as soon as I read the config and status in one sketch or any combinations of two registers the values are changing over time.
Code is attached.

CS5463_SPI_V4.0.ino (9.31 KB)

I agree, those signals look much better! There should also be a bypass cap on Vref. That may affect the readings, but doubt it would affect the register contents.

Could I suggest something like this at the end of loop, to pace the output and keep serial interrupts from delaying the SPI transfers? It keeps the LA traces together a little nicer:

  Serial.flush(); // let all the serial TX interrupts finish...

  static uint32_t lastTime = 0; // I would usually put this at file scope and
                                // initialize it to millis() at the end of setup
  while (millis() - lastTime < 1000) // or 2000ms?
    ;
  lastTime = millis();
}

This will make it a little easier to capture, too.

What output do you get when you read any two registers?

There is an IC bit in the status register that indicates an "invalid command" (if IC == 0). Be sure to check that.

And you're reading too many bytes for VOLTAGE_RMS, CURRENT_RMS, POWER and TEMPERATURE. Those are 1-byte registers. Although the spec says

Section 5.14:
Register writes must be followed by three bytes of data.
Register reads can return up to four bytes of data.

...I can only find one-byte or three-byte registers. ???

Cheers,
/dev

Blizzart:
I changed to a new version of code with more register writes.
The writing process seems totally fine in the LA.

I can read out the same register values as long as I only read one register and comment out everything else, as soon as I read the config and status in one sketch or any combinations of two registers the values are changing over time.
Code is attached.

Hi Blizzart, I also facing the same issue, reading CONFIG or STATUS only is ok (comment out everything else)
I am using Arduino Nano 5V. I unable to get a correct TEMPERATURE register reading as well, my room temperature expected around 24-26'C. But readings i get are

TEMPERATURE: 
10000
11110110
0
-2560


TEMPERATURE: 
10000
11110110
0
-2560


TEMPERATURE: 
10001
100100
0
9216

Below is the SPI setting i tried

  //start the SPI library;
  SPI.begin();
  SPI.setBitOrder(MSBFIRST);
  SPI.setClockDivider(64);
  SPI.setDataMode(SPI_MODE0);

  digitalWrite(CS, LOW);
	
  digitalWrite(RESET_PIN, LOW);
  delay (100);
  digitalWrite(RESET_PIN, HIGH);
  delay (100);
	
  //Sync commands 
  SPI.transfer(SYNC1);    
  SPI.transfer(SYNC1);     
  SPI.transfer(SYNC1);    
  SPI.transfer(SYNC0); 
   
  digitalWrite(CS, HIGH);

Do you have a working solution? can share?

Hey dennislwy,

I'm sorry for the delayed reply.
The problem you are facing is that you're trying to read out the CS5463 with 16MHz over SPI, but it only supports speeds up to 4MHz.
You are using the wrong code for setting up the SPI frequency (they changed it at some point), now you're not setting a divider any more, but the frequency itself.
This code should work:

 //start the SPI library;
  SPI.begin();
  SPI.beginTransaction(SPISettings(1000000,MSBFIRST,SPI_MODE0));		//Set SPI to 1MHz, MSBFIRST and SPI_MODE0
  
  	
//Run a Hardware Reset of the CS5463
	digitalWrite(CS, LOW);
	
	digitalWrite(RESET_PIN, LOW);
		delay (100);
	digitalWrite(RESET_PIN, HIGH);
		delay (100);

//Run a Soft Reset of the CS5463		
	//Sync commands 
   SPI.transfer(SYNC1);    
   SPI.transfer(SYNC1);     
   SPI.transfer(SYNC1);    
   SPI.transfer(SYNC0); 
   
   digitalWrite(CS, HIGH);
	
	delay (100);

Good evening,
I'm trying to create a meter using this IC and am basing myself on dennislwy friend code, but I'm also having the same problem, even without any signal in voltage and current inputs are my readings:

5
250
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
255
255
255
255
255
255
255
255
255
255
255
255
0
63
0
0
0
0
255
255
255
255
255
255
255
255
255
0
255
0
0
0
0
255
255
255
255
255
255
255
255
255
255
255
255
96
0
0
0
0
0
255
255
255
255
255
255
255
255
255
0
15
0
0
0
0
255
255
255
255
255
255
192
255
0
0
0
0
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
63
224
0
0
0
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
0
124
0
0
0
0
255
255
255
255
255
255
255
255
255
128
7
0
0
0
0
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
0
0
0
3
0
96
255
255
255
255
255
255
112
0
0
0
0
0
255
255
255
255
255
255
255
255
255
255
255
255
240
7
0
0
0
0
255
255
255
255
255
255
255
255
255
255
255
255
248
0
128
0
0
0
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
128
255
0
0
0
0
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
255
240
255
128
255
255
255
0
0
0
0
0
7
255
255
255
0
255
0
0
0
0
255
255
255
255
255
255
255
255
255
255
127
248
255
0

I'm using a simple code just to start doing the readings.

#include<SPI.h> //declaração da biblioteca de comunicação SPI

enum Registradores_CS5463{ //criando variáreis para os registradores do CS5463 e atribuindo valores fixos para elas

  // Registradores da Página 0
  CONFIGURACAO = 0,
  CORRENTE_DC_OFFSET = 1,
  GANHO_CORRENTE = 2,
  TENSAO_DC_OFFSET = 3,
  GANHO_TENSAO = 4,
  CONTADOR_CICLOS = 5, //número de conversões usado no conversor A/D
  TAXA_PULSOS_E = 6, //define a taxa de pulsos das saídas de energia E1, E2 e E3
  CORRENTE = 7,
  TENSAO = 8,
  POTENCIA_INSTANTANEA = 9, 
  POTENCIA_REAL = 10,
  CORRENTE_RMS = 11,
  TENSAO_RMS = 12,
  EPSILON = 13,
  POTENCIA_OFFSET = 14,
  ESTATUS = 15,
  CORRENTE_AC_OFFSET = 16,//RMS
  TENSAO_AC_OFFSET = 17, //RMS
  MODO = 18, 
  TEMPERATURA = 19,
  POTENCIA_REATIVA_MEDIA = 20,
  POTENCIA_REATIVA_INSTANTANEA = 21,
  PICO_CORRENTE = 22,
  PICO_TENSAO = 23,
  POTENCIA_REATIVA_TRIANGULO = 24,
  FATOR_POTENCIA = 25,
  MASCARA_INTERRUPCAO = 26,
  POTENCIA_APARENTE = 27,
  CONTROLE = 28,
  POTENCIA_ATIVA_HARMONICA = 29,
  POTENCIA_ATIVA_FUNDAMENTAL = 30,
  POTENCIA_REATIVA_FUNDAMENTAL = 31,


  // Registradores da Página 1
  LARG_PULSO_ENERGIA = 0,
  LIMITE_SEM_CARGA = 1,
  GANHO_TEMPERATURA = 2,
  TEMPERATURA_OFFSET = 3,


  // Registradores da Página 3
  INTERVALO_TENSAO_SAG = 6, //tempo em que a tensão deve se manter baixa para ativar a detecção de falha de tensão
  NIVEL_TENSAO_SAG = 7, //valor mínimo de tensão para ativar a detecção de falha de tensão
  INTERVALO_CORRENTE_SAG = 10, //tempo de falta de corrente para ativar a detecção de falha de corrente
  NIVEL_CORRENTE_SAG = 11, //valor mínimo de corrente para ativar a detecção de falha de corrente


  //COMANDOS
  LEITURA = 0,
  ESCRITA = 64,
  SYNC0 = 254,
  SYNC1 = 255,
};

const int PINO_CS = 10; //pino de controle do slave

byte H_VALOR_TENSAO_RMS;
byte M_VALOR_TENSAO_RMS;
byte L_VALOR_TENSAO_RMS;

byte H_VALOR_CORRENTE_RMS;
byte M_VALOR_CORRENTE_RMS;
byte L_VALOR_CORRENTE_RMS;

byte H_VALOR_POTENCIA_REAL;
byte M_VALOR_POTENCIA_REAL;
byte L_VALOR_POTENCIA_REAL;

byte H_VALOR_POTENCIA_APARENTE;
byte M_VALOR_POTENCIA_APARENTE;
byte L_VALOR_POTENCIA_APARENTE;

byte H_VALOR_POTENCIA_REATIVA;
byte M_VALOR_POTENCIA_REATIVA;
byte L_VALOR_POTENCIA_REATIVA;

void setup (){

pinMode(PINO_CS, OUTPUT); //define pino slave como saída
digitalWrite(PINO_CS, HIGH);

Serial.begin(9600);

SPI.begin();

SPI.setBitOrder(MSBFIRST);
SPI.setClockDivider(16);
SPI.setDataMode(SPI_MODE0);

delay(100);

//Configura o registrador CONFIGURACAO
digitalWrite(PINO_CS, LOW); //Seleciona o slave CS5463
SPI.transfer(0x40); //1º byte (comando de escrita e endereço do registrador CONFIGURACAO) 0100 0000
SPI.transfer(0x00); //2º byte (configuração) 0000 0000 - ultimo bit define PGA (ganho do amplificador de corrente) como 10x
SPI.transfer(0x00); //3º byte (configuração) 0000 0000
SPI.transfer(0x01); //4º byte (configuração) 0000 0001 - ultimo bit define o divisor de clock como 1
digitalWrite(PINO_CS, HIGH); //Desativa o slave CS5463

//Configura o registrador MODO
digitalWrite(PINO_CS, LOW); //Seleciona o slave CS5463
SPI.transfer(0x64); //1º byte (comando de escrita e endereço do registrador MODO) 0110 0100
SPI.transfer(0x00); //2º byte (configuração) 0000 0000
SPI.transfer(0x00); //3º byte (configuração) 0000 0000
SPI.transfer(0x01); //4º byte (configuração) 0000 0001 - ultimo bit ativa AFC
digitalWrite(PINO_CS, HIGH); //Desativa o slave CS5463

//Configura o registrador CONTROLE
digitalWrite(PINO_CS, LOW); //Seleciona o slave CS5463
SPI.transfer(0x78); //1º byte (comando de escrita e endereço do registrador CONTROLE) 0111 1000
SPI.transfer(0x00); //2º byte (configuração) 0000 0000
SPI.transfer(0x00); //3º byte (configuração) 0000 0000
SPI.transfer(0x04); //4º byte (configuração) 0000 0100 - bit 1 desativa o pino CPUCLK para economizar energia
digitalWrite(PINO_CS, HIGH); //Desativa o slave CS5463
}

void loop()
{
  digitalWrite(PINO_CS, LOW);
  SPI.transfer(0x18);
  H_VALOR_TENSAO_RMS = SPI.transfer(SYNC1);
  M_VALOR_TENSAO_RMS = SPI.transfer(SYNC1);
  L_VALOR_TENSAO_RMS = SPI.transfer(SYNC1);
  digitalWrite(PINO_CS, HIGH);

Serial.println(H_VALOR_TENSAO_RMS);
Serial.println(M_VALOR_TENSAO_RMS);
Serial.println(L_VALOR_TENSAO_RMS);

}

If you can give help I would greatly appreciate it.

Hey alan_lima

I didn't read your whole code, but I can tell you that you are using the wrong SPI settings.
Try exchanging the following part:

alan_lima:
SPI.begin();

SPI.setBitOrder(MSBFIRST);
SPI.setClockDivider(16);
SPI.setDataMode(SPI_MODE0);

delay(100);

with that:

//start the SPI library;
  SPI.begin();
  SPI.beginTransaction(SPISettings(1000000,MSBFIRST,SPI_MODE0)); //Set SPI to 1MHz, MSBFIRST and SPI_MODE0

Thank Blizzart,
I tried it with the changes you suggested but not changed.

I understand that SPI.setClockDivider line of code (16); is dividing the clock by 16 like the Arduino clock is 16Mhz, is 1 MHz which is within the acceptable CS5463 value. The other parameters are the same.
If you can give any other tips would greatly appreciate it, I need to be able to make this project work as soon as possible.

Can you please post the full code you used after you did the changes?
Blizzart

Blizzard, I had read the whole topic, but I will re-read (my English is poor and I have missed something) and try again and put the result.

I tried using your code with as little change as possible. Just let the CS5463 the mode pin on the direct GND and direct reset pin VCC and used the pin 10 as CS (I'm using Arduino UNO). But readings still wrong. I'm using a protobord'll make a plate with welded components to reduce the possibility of poor contact. You could build your project with this IC and the Arduino? If you have any tip or idea to give me thank you very much, I need to be able to make this work as soon as possible is for a final project of my graduation from college.

Can you please provide the latest version of your code?
Blizzart

This is the code I used:

enum CS5463_register_t {
  
 //Register Page 0
 CONFIG = 0,   CURRENT_DC_OFFSET = 1,   CURRENT_GAIN = 2,   VOLTRAGE_DC_OFFSET = 3,   VOLTAGE_GAIN = 4,   CYCLE_COUNT = 5,   PULSE_RATE_E = 6,   CURRENT = 7,   VOLTAGE = 8,   POWER = 9,   POWER_ACTIVE = 10, CURRENT_RMS = 11, 
 VOLTAGE_RMS = 12, EPSILON = 13, POWER_OFFSET = 14, 
 STATUS = 15, 
 CURRENT_AC_OFFSET = 16, VOLTAGE_AC_OFFSET = 17, 
 MODE = 18, TEMPERATURE = 19, 
 POWER_REACTIVE_AVERAGE = 20, POWER_REACTIVE = 21, CURRENT_PEAK = 22, 
 VOLTAGE_PEAK = 23, 
 POWER_REACTIVE_TRIANGLE = 24, 
 POWERFACTOR = 25, MASK_INTERUPT = 26, POWER_APPARENT = 27, CONTROL = 28, POWER_ACTIVE_HARMONIC = 29, POWER_ACTIVE_FUNDAMENTAL = 30, POWER_REACTIVE_FUNDAMENTAL = 31, 
    
 //Register Page 1
 PULSE_WIDTH = 0,
 LOAD_MIN = 1,
 TEMPERATURE_GAIN = 2,
 TEMPERATURE_OFFSET = 3,
 
 //Register Page 3
 VOLTAGE_SAG_DURATION = 6,
 VOLTAGE_SAG_LEVEL = 7,
 CURRENT_SAG_DURATION = 10,
 CURRENT_SAG_LEVEL = 11,

 // COMMANDS
 Read = 0,
 Write = 64,
 SYNC0 = 254, //SYNC 0 Command: Last byte of a serial port re-initialization sequence
 SYNC1 = 255, //SYNC 1 Command: Used during reads and serial port initialization.
 SELECT_PAGE = 0x1F,
 START_CONTINOUS = 0xE8,
 
}
;
const int CS = 10; // Assign the Chip Select signal to pin 8
//const int RESET_PIN = 13; // Assign Reset to pin 13
//const int MODE_PIN = 9; // Assign Mode to pin 9


//Bytes after register read
byte H_Byte_CONFIG;          //High Byte 
byte M_Byte_CONFIG;          //Middle Byte 
byte L_Byte_CONFIG;          //Low Byte

byte H_Byte_STATUS;          
byte M_Byte_STATUS;           
byte L_Byte_STATUS;          

byte H_Byte_VOLTAGE_RMS;
byte M_Byte_VOLTAGE_RMS;
byte L_Byte_VOLTAGE_RMS;

byte H_Byte_CURRENT_RMS;
byte M_Byte_CURRENT_RMS;
byte L_Byte_CURRENT_RMS;

byte H_Byte_POWER;
byte M_Byte_POWER;
byte L_Byte_POWER;

byte H_Byte_TEMPERATURE;
byte M_Byte_TEMPERATURE;
byte L_Byte_TEMPERATURE;

void setup() {   

  pinMode(CS, OUTPUT); //initalize the chip select pin;
//  pinMode(RESET_PIN, OUTPUT); //initalize the RESET pin;
//  pinMode(MODE_PIN, OUTPUT); //initialize the MODE pin;

  digitalWrite(CS, HIGH);
//  digitalWrite(RESET_PIN, HIGH);
//  digitalWrite(MODE_PIN, LOW);
  
  delay (100);
  
  
 //Create a serial connection to display the data on the terminal.   
  Serial.begin(9600);
  
//start the SPI library;
  SPI.begin();
  SPI.beginTransaction(SPISettings(1000000,MSBFIRST,SPI_MODE0)); //Set SPI to 1MHz, MSBFIRST and SPI_MODE0
  

 
 
 digitalWrite(CS, LOW);
 
// digitalWrite(RESET_PIN, LOW);
// delay (100);
// digitalWrite(RESET_PIN, HIGH);
// delay (100);
 
 //Sync commands 
   SPI.transfer(SYNC1);    
   SPI.transfer(SYNC1);     
   SPI.transfer(SYNC1);    
   SPI.transfer(SYNC0); 
   
   digitalWrite(CS, HIGH);
 
 delay (100);
 
 //Set Config register
 digitalWrite(CS, LOW); //Chip select to low to initialise comms with CS5463 
 SPI.transfer( Write | (CONFIG<<1) );
 SPI.transfer(0x00);   //3 bytes of data to set 24bits of config register        
   SPI.transfer(0x00);     
   SPI.transfer(0x01); 
    digitalWrite(CS, HIGH);   //Chip select to HIGH to disable comms with CS5463  

 //Set Mask register
 digitalWrite(CS, LOW); 
 SPI.transfer( Write | (MASK_INTERUPT<<1) );
 SPI.transfer(0x00);   //3 bytes of data to set 24bits of mask register (Set for no interrupts) 
 SPI.transfer(0x00);     
 SPI.transfer(0x00); 
 digitalWrite(CS, HIGH);   
 
 //Set Mode register
 digitalWrite(CS, LOW); 
 SPI.transfer( Write | (MODE<<1) );
 SPI.transfer(0x00);   //Sets High pass filters on Voltage and Current lines, sets automatic line frequency measurements 
 SPI.transfer(0x00);     
 SPI.transfer(0x01); 
 digitalWrite(CS, HIGH); 
 
 //Set Control register
 digitalWrite(CS, LOW); 
 SPI.transfer( Write | (CONTROL<<1) );
 SPI.transfer(0x00);   //Disables CPUCLK 
 SPI.transfer(0x00);     
 SPI.transfer(0x4); 
 digitalWrite(CS, HIGH);

 digitalWrite(CS, LOW); 
 SPI.transfer(START_CONTINOUS);
 digitalWrite(CS, HIGH);
 
 
 }


void loop()
{
 digitalWrite(CS, LOW);
 SPI.transfer( Read | (CONFIG << 1 ));     //Read the Config Register                                 
 H_Byte_CONFIG = SPI.transfer(SYNC1);   //Reads high byte and writes sync1                                      
 M_Byte_CONFIG = SPI.transfer(SYNC1);   //Reads middle byte and writes sync1                                    
 L_Byte_CONFIG = SPI.transfer(SYNC1);   //Reads low byte and writes sync1                                   
 //delay (10);
 digitalWrite(CS, HIGH);
 
 //delay (10);
 
 digitalWrite(CS, LOW);
 SPI.transfer( Read | (STATUS << 1 )); //Status //LSB "B0" is always zero
 H_Byte_STATUS = SPI.transfer(SYNC1);   //Reads high byte and writes sync1                                      
 M_Byte_STATUS = SPI.transfer(SYNC1);   //Reads middle byte and writes sync1                                    
 L_Byte_STATUS = SPI.transfer(SYNC1);   //Reads low byte and writes sync1 
 //delay (10);
 digitalWrite(CS, HIGH);
 
 
 digitalWrite(CS, LOW);
 SPI.transfer( Read | (VOLTAGE_RMS << 1 )); 
 H_Byte_VOLTAGE_RMS = SPI.transfer(SYNC1);   //Reads high byte and writes sync1                                      
 M_Byte_VOLTAGE_RMS = SPI.transfer(SYNC1);   //Reads middle byte and writes sync1                                    
 L_Byte_VOLTAGE_RMS = SPI.transfer(SYNC1);   //Reads low byte and writes sync1 
 digitalWrite(CS, HIGH);
 
 digitalWrite(CS, LOW);
 SPI.transfer( Read | (CURRENT_RMS << 1 )); 
 H_Byte_CURRENT_RMS = SPI.transfer(SYNC1);   //Reads high byte and writes sync1                                      
 M_Byte_CURRENT_RMS = SPI.transfer(SYNC1);   //Reads middle byte and writes sync1                                    
 L_Byte_CURRENT_RMS = SPI.transfer(SYNC1);   //Reads low byte and writes sync1 
 digitalWrite(CS, HIGH);
 
 digitalWrite(CS, LOW);
 SPI.transfer( Read | (POWER << 1 )); 
 H_Byte_POWER = SPI.transfer(SYNC1);   //Reads high byte and writes sync1                                      
 M_Byte_POWER = SPI.transfer(SYNC1);   //Reads middle byte and writes sync1                                    
 L_Byte_POWER = SPI.transfer(SYNC1);   //Reads low byte and writes sync1 
 digitalWrite(CS, HIGH);
 
 digitalWrite(CS, LOW);
 SPI.transfer( Read | (TEMPERATURE << 1 )); 
 H_Byte_TEMPERATURE = SPI.transfer(SYNC1);   //Reads high byte and writes sync1                                      
 M_Byte_TEMPERATURE = SPI.transfer(SYNC1);   //Reads middle byte and writes sync1                                    
 L_Byte_TEMPERATURE = SPI.transfer(SYNC1);   //Reads low byte and writes sync1 
 digitalWrite(CS, HIGH);
 
 
 int value_VOLTAGE_RMS = (H_Byte_VOLTAGE_RMS << 16) |(M_Byte_VOLTAGE_RMS << 8) | L_Byte_VOLTAGE_RMS ;
 int value_CURRENT_RMS = (H_Byte_CURRENT_RMS << 16) |(M_Byte_CURRENT_RMS << 8) | L_Byte_CURRENT_RMS ;
 int value_POWER = (H_Byte_POWER << 16) |(M_Byte_POWER << 8) | L_Byte_POWER ;
 int value_TEMPERATURE = (H_Byte_TEMPERATURE << 16) |(M_Byte_TEMPERATURE << 8) | L_Byte_TEMPERATURE ;
 
 
 
 delay (10);

 Serial.print("Config: ");
 Serial.println(H_Byte_CONFIG,BIN);
 Serial.println(M_Byte_CONFIG,BIN);
 Serial.println(L_Byte_CONFIG,BIN);
 delay (10);
 Serial.print("Status: ");
 Serial.println(H_Byte_STATUS,BIN);
 Serial.println(M_Byte_STATUS,BIN);
 Serial.println(L_Byte_STATUS,BIN);
 delay (10);

 Serial.print("VOLTAGE_RMS: ");
 Serial.println(H_Byte_VOLTAGE_RMS,BIN);
 Serial.println(M_Byte_VOLTAGE_RMS,BIN);
 Serial.println(L_Byte_VOLTAGE_RMS,BIN);
 Serial.println(value_VOLTAGE_RMS);
 delay (10);
 
 Serial.print("CURRENT_RMS: ");
 Serial.println(H_Byte_CURRENT_RMS,BIN);
 Serial.println(M_Byte_CURRENT_RMS,BIN);
 Serial.println(L_Byte_CURRENT_RMS,BIN);
 Serial.println(value_CURRENT_RMS);
 delay (10);
 
 Serial.print("POWER: ");
 Serial.println(H_Byte_POWER,BIN);
 Serial.println(M_Byte_POWER,BIN);
 Serial.println(L_Byte_POWER,BIN);
 Serial.println(value_POWER);
 delay (10);
 
 Serial.print("TEMPERATURE: ");
 Serial.println(H_Byte_TEMPERATURE,BIN);
 Serial.println(M_Byte_TEMPERATURE,BIN);
 Serial.println(L_Byte_TEMPERATURE,BIN);
 Serial.println(value_TEMPERATURE);
 delay (10);
 
}

Hey alan_lima

I can't make out any mistakes at the moment.
I'm not working on that project anymore and don't have the hardware to do any testing at the moment, furthermore I'm in my exam period myself right now, that's why I don't have time to look further into it.
But here is my Version that I believe was stable and was working correct.
I hope that's any help for you.

Best wishes and good luck!
Blizzart

CS5463_SPI_V5.0.ino (8.82 KB)

This is the result shown:

Config: 0
0
0
Status: 0
0
0
VOLTAGE_RMS: 0
0
0
0
CURRENT_RMS: 0
0
0
0
POWER: 0
0
0
0
TEMPERATURE: 0
0
0
0

Okay, thank you Blizzard, I will test again after put the result here in any way thank you for your help.

Please check this code work ok for me

MEU_CODIGO_COM_DISPLAY__RTC_E_SD_V.1.5.ino (14.1 KB)

sonnyyu:
The method of sensor AC:

Voltage Sensing Unit:

  • Resistor divider
  • AC Voltage stepdown transformer

Current Sensing Unit:

  • Current transformer
  • Hall effect-based current sensor
  • Rogowski coil sensor
  • Shunt resistor

Energy Processor 78M6610+PSU/C48 use "Shunt resistor" + "Resistor divider". That is reason we need isolator.

The CS5463 board use:

  • AC Voltage stepdown transformer
  • Current transformer

and by pass arduino directly connect with AR9331 SPI interfaces.

Looks like an interesting board, but what a silly arrangement! I think that current transformer should be rotated 90 degrees. The way its oriented, and being so close to the transformer, how are you supposed to pass one of the AC lines through it? It looks like it would only handle a small flexible wire, and even that would be difficult to thread.

ShapeShifter:
Looks like an interesting board, but what a silly arrangement! I think that current transformer should be rotated 90 degrees. The way its oriented, and being so close to the transformer, how are you supposed to pass one of the AC lines through it? It looks like it would only handle a small flexible wire, and even that would be difficult to thread.

I spoken with the board designer and he confirmed the problem, The work around is rotate 45 degree of current transformer.