I am connecting a Texas Instruments EVM430-AFE253S to an Arduino Mega, to read power on a high voltage line. The wiring diagram is attached.
According to the datasheet on page 17, the unit should be outputting 12 bytes of data, every ~66 mS.
The first byte should be always be 0x68, and the 11th byte should always be 0x00.
The serial format is 9600 bps, No parity, 8 data bit, 1 stop bit.
When I read the serial port on the Arduino, this is what I receive:
29,6A,EB,E7,1,0,9B,80,CF,CD,0,
29,2A,FD,E9,1,0,3B,80,D6,D,
29,EA,EB,E7,1,0,33,E8,A1,0,
29,EA,FD,EB,1,0,3C,80,DC,B7,
29,EA,FD,E7,1,0,36,80,9A,39,0,
29,2A,EB,E7,1,0,34,80,98,9,
29,AA,FD,E7,1,0,9D,80,A7,C9,
29,2A,EB,E9,1,0,2E,80,93,69,0,
29,6A,EB,E9,1,0,2C,80,FC,3B,
29,2A,EB,EB,1,0,27,80,C7,D3,0,
29,EA,FD,E7,1,0,11,0,9E,FF,0,
29,2A,FD,E9,1,0,8,9C,31,0,
29,AA,F5,E7,1,0,23,5D,B5,0,
29,6A,F5,E7,1,0,8B,A8,13,0,
29,2A,F5,E5,1,0,1C,0,57,8B,0,
29,AA,EA,E7,1,0,91,B9,95,0,
29,2A,EA,E7,1,0,CB,8D,95,
29,EA,FD,E9,1,0,31,80,F3,B7,0,
29,6A,FD,E7,1,0,2C,80,E2,51,0,
29,AA,FA,E9,1,0,19,2D,19,0,
29,2A,FD,E5,1,0,C8,57,C1,
29,AA,FD,E5,1,0,C8,49,A3,
29,2A,EA,E5,1,0,1A,A5,99,0,
29,AA,EA,E9,1,0,90,27,81,0,
29,EA,EA,E7,1,0,2C,80,E3,DD,0,
29,2A,F5,E7,1,0,95,80,E2,89,0,
29,EA,EA,E7,1,0,98,80,F2,83,0,
29,6A,FD,E7,1,0,8D,5D,BF,
29,6A,FA,E7,1,0,8A,A3,D1,0,
29,AA,FA,E7,1,0,10,0,F3,59,0,
29,2A,FD,E5,1,0,8E,5C,77,
29,6A,FD,E7,1,0,8D,AE,C1,
29,6A,FD,E7,1,0,2C,80,E3,FF,0,
29,6A,FD,EB,1,0,2F,80,FE,69,0,
29,AA,FA,E9,1,0,24,80,E0,F3,
29,AA,FA,E9,1,0,88,3C,2B,0,
29,AA,FA,E7,1,0,17,0,FA,F9,
29,2A,FD,E9,1,0,46,D7,A9,
29,6A,FD,E7,1,0,45,D3,8F,
29,AA,FD,E7,1,0,15,0,4B,67,
29,EA,FA,E7,1,0,90,DB,1B,0,
29,2A,FD,E7,1,0,29,80,FC,33,
29,6A,FD,E7,1,0,26,80,C0,8F,
29,AA,FD,E9,1,0,92,80,85,5B,0,
29,2A,EA,E7,1,0,34,80,CD,2D,
29,AA,EA,E7,1,0,A0,80,F5,15,0,
29,6A,F5,E7,1,0,D2,7D,4B,
29,2A,F5,E7,1,0,53,C0,C0,37,
29,2A,F5,E7,1,0,A6,40,C2,EB,
29,2A,F5,E9,1,0,42,80,DB,25,
29,EA,F5,E5,1,0,43,80,AD,73,0,
29,2A,F5,E7,1,0,34,7C,F3,0,
29,AA,FD,E7,1,0,D2,BE,A1,
29,EA,FA,E7,1,0,A5,40,C1,5,0,
29,AA,FA,E7,1,0,A3,80,FB,C5,0,
29,AA,FD,E7,1,0,67,AA,C1,
29,2A,F5,E7,1,0,CD,38,B7,0,
29,AA,F5,E9,1,0,CB,28,7B,
29,EA,F5,E9,1,0,CC,38,E7,0,
29,2A,F5,E7,1,0,CF,4D,3D,0,
29,EA,F5,E9,1,0,51,1,22,BF,
29,EA,F5,E7,1,0,34,77,B7,
29,AA,F5,E7,1,0,A4,80,EE,79,
29,EA,F5,E7,1,0,4E,1,82,27,0,
29,2A,F5,E7,1,0,A9,C0,FC,4B,0,
I connected an oscilloscope to the serial and ground pins (see other attached picture).
Using the on-board serial decoder, I read 68,5B,35,00,0B,FF,FF,A2,01,51,00,48.
Over multiple reads, the first and 11th byte remain constant (0x68 & 0x00 respectively).
Why am I getting completely different data?
Why am I not getting 12 bytes each time?
void setup()
{
unsigned long PowerOnTime = millis();
uint16_t i,j,k;
uint8_t temp,temp2,data[100];
Serial1.begin(9600);
Serial2.begin(9600);
Serial.begin(115200);
Serial.println(micros());
temp2 = 0;
while(1)
{
while(Serial2.available())
{
data[temp2++] = Serial2.read();
PowerOnTime = millis();
}
if((temp2 > 30) || ((millis() - PowerOnTime) > 40))
{
for(i = 0; i < temp2; i++)
{
Serial.print(data[i], HEX);
Serial.print(",");
}
temp2 = 0;
Serial.println(" ");
PowerOnTime = millis();
}
}
}