Miteshdesai86
Newbie level 2
Hello
I am working on Project of AC power Analyzer Using Micro-controller (Arduino) , in which i need to Measure RMS Voltage , RMS Current , Active power, Reactive power , Power Factor and Harmonic value of 1st to 10Th Odd Harmonic and Last THD.
at present status I am Abel to measure RMS Voltage , RMS Current , Active power, Reactive power , Power Factor.
But i dont Know How To measure Value of Harmonic Like 3rd , 5th , 7th and THD.
I am converting 120 V ac signal to 0-5 V For Arduino / ADC and Doing Sampling of Analog signal in ADC
Bellow is logic/Program for That
Average power
RMS Voltage / CUrrent
Now Need Help for Calculating 3rd , 5th , 7th and THD.
Please Advise me How to do that.
Thank you
I am working on Project of AC power Analyzer Using Micro-controller (Arduino) , in which i need to Measure RMS Voltage , RMS Current , Active power, Reactive power , Power Factor and Harmonic value of 1st to 10Th Odd Harmonic and Last THD.
at present status I am Abel to measure RMS Voltage , RMS Current , Active power, Reactive power , Power Factor.
But i dont Know How To measure Value of Harmonic Like 3rd , 5th , 7th and THD.
I am converting 120 V ac signal to 0-5 V For Arduino / ADC and Doing Sampling of Analog signal in ADC
Bellow is logic/Program for That
Average power
Code C - [expand] 1 2 3 4 5 6 for (n=0; n<number_of_sample; n++){ // inst_voltage and inst_current calculation from raw ADC goes here inst_power = inst_voltage * inst_current; sum_inst_power += inst_power; } Average_power = sum_inst_power / number_of_samples;
RMS Voltage / CUrrent
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 for (n=0; n<number_of_sample; n++){ // inst_voltage calculation from raw ADC input goes here. squared_voltage = inst_voltage * inst_voltage; sum_squared_voltage += squared_voltage; } mean_square_voltage = sum_squared_voltage / number_of_samples; root_mean_square_voltage = sqrt(mean_square_voltage); apparent_power = root_mean_square_voltage * root_mean_square_current; power_factor = real_power / apparent_power;
Now Need Help for Calculating 3rd , 5th , 7th and THD.
Please Advise me How to do that.
Thank you
Last edited by a moderator: