# Idea of measuring RMS voltage and current using MCU ADC

Status
Not open for further replies.

#### arup

##### Member level 2
Dear sir,

I have a project which needs to measure Supply Voltage and Current.I want to measure them using only MCu adc (ST7 with 10 bit ADC and 6 analog i/p channel).Could anybody help me ??I want a tested circuit and also want the design idea/steps to develope this firmware to measure voltage and current rms value.I believe supply input voltage is always RMS if it is not mentioned.so i don't have to take voltage sample ,square ,take average and take root of it.Or do I??Pls correct me if i am wrong.
pls note the max voltage and current for the system to measure are 260 V and 30 A respectively.And I know how to configure the adc for this particular MCU

Thanks,

arup

#### smxx

##### Full Member level 4
hi
Analoge Device have some Ic that give a signal and give rms value in output (analog output).
for sine wave ,if you have 2 sample with 90 angle(y(Θ)and y(Θ+90))
you can calculate peek of signal
Ym²=y(Θ)²+y(Θ+90)² Yrms=Ym/√2

#### amrstaha

##### Full Member level 2
You will have to sample the voltage (or current) signal at a fixed rate if the signal is not sinusoidal. The sampling frequency should be as high as possible to accurate results. After taking n samples you can caculate the RMS from

frms=√(Σ(sample(i)^2)/n) where i=1 to n

#### arup

##### Member level 2
yes, The i/p supply wave form is sinusoidal.Max analog signal to the ADC pin is 5V .If any body is having the ckt pls post here.

thanks,
arup

#### narender_aec_eee

##### Newbie level 2
hi can anyone upload a circuit which can measure ac voltage using parallel port or microcontroler and adc.

Status
Not open for further replies.