sribalaji
Junior Member level 2
I need to measure power using microcontroller for my project.
I'm using atmega 88. Right now, I've stepped down the input supply(voltage and current) and DC biased it so that the value doesnot go to the negative.
What I've decided is to sample both voltage and current simultaneously(changing ADMUX),multiply both for every instant, accumulate it for 50 Hz and divide it by no of samples.
This is where my problem is. What should be my adc frequency so that the value is accurate? clock is 8MHz and adc prescalar factor is 128.
should my no of samples be 1250 or am i missing something basic here..
I'm using atmega 88. Right now, I've stepped down the input supply(voltage and current) and DC biased it so that the value doesnot go to the negative.
What I've decided is to sample both voltage and current simultaneously(changing ADMUX),multiply both for every instant, accumulate it for 50 Hz and divide it by no of samples.
This is where my problem is. What should be my adc frequency so that the value is accurate? clock is 8MHz and adc prescalar factor is 128.
should my no of samples be 1250 or am i missing something basic here..