Questions about ADE9153A


I'm fairly new with energy monitoring chips, so I'm not quite sure how to setup everything correctly. I've downloaded the example code for the arduino Uno Evaluation kit and I'm trying to adapt it for our project. Instead of SPI protocol, we use RS232, and that part seems to work fine.

I'm just not really sure about the value I should put in some registers like the PGAGAIN, AIGAIN, AVGAIN... and VLEVEL. It seems like no matter what I set in those registers, the values I read form AVRMS or AIRMS for example are wrong (I got dec values from 1884307456 to 3471326976 reading VRMS register). I read the datasheet and tried different values without success.

Also, I tried to run the mSure autocalibration, but the bit "ms_sysrdyp" in register MS_STATUS_CURRENT is never set, no matter what I do.

Last thing, following the example code and the datasheet, I tried to read the temperature but the register TEMP_RSLT always stays at 0, giving me a temperature of like -1800°C after the calculations.

This is how my registers are configured right now:

	gADE9153A_Registers.ai_pgagain.bit_ai_swap = 	PGA_SWAP_SIGNAL_ON_IAP;
	gADE9153A_Registers.ai_pgagain.bits_ai_gain = 	PGA_GAIN_16X;				// ADC GAIN = 16x

	gADE9153A_Registers.config0 = 					ADE9153A_DEFAULT_CONFIG0;	// Default Config0 settings
	gADE9153A_Registers.config1 = 					ADE9153A_DEFAULT_CONFIG1;	// Default Config1 settings
	gADE9153A_Registers.config2 = 					ADE9153A_DEFAULT_CONFIG2;	// Default Config2 settings
	gADE9153A_Registers.config3 = 					ADE9153A_DEFAULT_CONFIG3;	// Default Config3 Settings

	gADE9153A_Registers.accmode.bit_selfreq = 		ACC_FREQ_60Hz;				// Energy Accumulation Frequency = 60Hz
	gADE9153A_Registers.vlevel.bits_vlevel_val = 	0x002C11E8;					// NOT SURE, FOUND IN EXAMPLE CODE

	gADE9153A_Registers.mask = 						ADE9153A_DEFAULT_MASK;		// Disable all interrupts (Default)

	gADE9153A_Registers.temp_cfg.bit_temp_start = 	ENABLED;
	gADE9153A_Registers.temp_cfg.bits_temp_time	= 	TEMP_SAMPLES_1;				// 1 samples. New temperature measurement every 1 ms

Also, here is the schematic:

Thank you !