Hi,
I’m using SD16_A to measure energy. Ch0, 1 and 2 are connected to voltage channels and Ch3, 4, 5 connected to current channels in a system which is 3-phase 4-wire.
On the sd16a initialization, I configured ch0 to 4 as grouped and ch5 is the master and interrupt source. And initially I set all preload delay value to 128.
Well, I calibrated the meter when power factor = 1. Now the meter is pulsing and the error value is %0.05 for any phase which is good. When I change Power factor to 0.5 which means 60 degree inductive, now the error is around %1.0 for any phases. If I change SD16PRE3 preload value with 110 instead of 128, First phase error disappears, but I didn`t understand why or how.
My question is the relation between pulse error at PF=0.5 and PRELOAD values. How can I calculate formula which describes the relation between error and preload values? (for the systems 50Hz and 60 Hz)
Actually, I didn`t understand the delay mechanism in grouped mode. In our design, ideally, voltage and current channels for the phase R (Ch0 and Ch3) should be sampled at the same time. And practically, I should be able to specify the time between these samples. There are two preload values, one belongs to Ch0 and the order belongs to Ch3. Which register does exactly describe the time between ch0 and ch3 sampling time?
Thank you.
void init_sd16a(void)
{
// ref on, ref buffer on, 1/1 and 1/8 divider, SMCLK, ov interrupt disabled
SD16CTL = SD16XDIV_0 + SD16DIV_3 + SD16SSEL_1 + SD16VMIDON + SD16REFON;
// OSR 1024, Bipolar, DF, grouped
SD16CCTL0 = SD16OSR_1024 + SD16DF + SD16GRP;
// OSR 1024, Bipolar, DF, grouped
SD16CCTL1 = SD16OSR_1024 + SD16DF + SD16GRP;
// OSR 1024, Bipolar, DF, grouped
SD16CCTL2 = SD16OSR_1024 + SD16DF + SD16GRP;
// OSR 1024, Bipolar, DF, grouped
SD16CCTL3 = SD16OSR_1024 + SD16DF + SD16GRP;
// OSR 1024, Bipolar, DF, grouped
SD16CCTL4 = SD16OSR_1024 + SD16DF + SD16GRP;
// OSR 1024, Bipolar, DF, NOT grouped, interrupt enable
SD16CCTL5 = SD16OSR_1024 + SD16DF + SD16IE;
SD16PRE0 = 128; // Voltage Ch R
SD16PRE1 = 128; // Voltage Ch S
SD16PRE2 = 128; // Voltage Ch T
SD16PRE3 = 128; // Current Ch R
SD16PRE4 = 128; // Current Ch S
SD16PRE5 = 128; // Current Ch T
__delay_cycles(1000);
}