Hello All.

I am Sudarshan from India. I recently finished my final year B.E from PES Institute of Technology, Bangalore in Electrical and Electronics branch. I want to further my final year project now and I am facing few hurdles in the process and it would help me a lot if you guys could help me. I am going to give you my final year project details now.

M/s: SUDARSHAN ELECTRONICS (my father’s company) manufacture AC-AC Power Controllers from the smallest Rating of 20 Amps right up to 500 Amps as a Standard Product. These Controllers basically have Two Sections – Power Section and Control Section.

My objective was to to convert a part of the existing analog control section to DIGITAL CONTROL and find the values like Power, Power Factor, etc.

The input is 3-phase 415 V which is then stepped down to 10 V using a step down transformer for each phase. This signal is shifted above the zero value and is then reduced to 5 V before sending it to the Analog pin of the Arduino. The load is purely resistive (incandescent bulbs - 3 bulbs for each phase, so a total of 9 bulbs). I am able to find the power factor for single phase (the value is in the range of 0.91-0.98) but I am finding it difficult to get the same for Three phase. I will also share the code for the single phase power factor.

```
void setup() {
Serial.begin(9600);
}
int v,i,n=0;
double inst_power,inst_voltage,inst_current;
double voltage,current,power;
double p,sum_p,real_power;
double square_voltage,sum_square_voltage,mean_square_voltage,root_mean_square_voltage;
double square_current,sum_square_current,mean_square_current,root_mean_square_current;
double apparent_power,power_factor;
void loop() {
v = analogRead(A0);
i = analogRead(A1);
inst_voltage = v;
inst_current = i;
inst_power = v*i;
Serial.print("inst_power = ");
Serial.println(inst_power);
Serial.println(" ");
//REAL POWER CALCULATION
for(n=0; n<4131; n++)
{
p = inst_voltage * inst_current;
sum_p += p;
}
real_power = sum_p / 4131;
//ROOT MEAN SQUARE VOLTAGE CALCULATION
for(n=0; n<8261; n++)
{
square_voltage = inst_voltage * inst_voltage;
sum_square_voltage += square_voltage;
}
mean_square_voltage = sum_square_voltage / 8261;
root_mean_square_voltage = sqrt(mean_square_voltage);
//ROOT MEAN SQUARE CURRENT CALCULATION
for(n=0; n<8621; n++)
{
square_current = inst_current * inst_current;
sum_square_current += square_current;
}
mean_square_current = sum_square_current / 8261;
root_mean_square_current = sqrt(mean_square_current);
//APPARENT POWER CALCULATION
apparent_power = root_mean_square_voltage * root_mean_square_current;
//POWER FACTOR CALCULATION
power_factor = real_power / apparent_power;
Serial.print("Power factor = ");
Serial.println(power_factor);
delay(500);
```

It would help me a lot if you guys could shed some light on the same.

Thank you.

Best regards,

Sudarshan.