electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

Measure RMS


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Measure RMS
Author Message
et.vinny



Joined: 15 Dec 2005
Posts: 3


Post15 Dec 2005 15:50   

Measure RMS


Heloo, this is my first post, excuse my bad English, therefore it is not my native language.
I am wanting to mount a measurer of tension AC, in the PIC.
My problem is in the account to calculate the RMS, therefore it is using much memory of the PIC, therefore it is in C. Somebody would have some code to calculate RMS, in ASM, or C but ligth?
Using PIC16F876 or PIC16F877

Thaks

ET
Back to top
Google
AdSense
Google Adsense




Post15 Dec 2005 15:50   

Ads




Back to top
Tohu



Joined: 09 Jun 2004
Posts: 97
Helped: 12


Post15 Dec 2005 18:33   

Re: Measure RMS


What be type of the signal, you know the form /sin, square etc./or this is random AC signal ?
Back to top
et.vinny



Joined: 15 Dec 2005
Posts: 3


Post15 Dec 2005 20:31   

Re: Measure RMS


Is sin, for eletric energy.

Thaks

ET
Back to top
xxargs



Joined: 28 Jul 2002
Posts: 231
Helped: 44


Post16 Dec 2005 0:39   

Re: Measure RMS


et.vinny wrote:
Is sin, for eletric energy.

Thaks

ET


if only one sinus carrier at AC-insignal, is easy (0.7071 * Up-p)/2 = voltage RMS

Up-p is measured voltage peak to peak.

---

but if measure complex multi frequency and noise signal is more difficult.

remember RMS means 'root mean square' and represent powers heat disspated from resistance with any wave form Voltage (from GHz to DC) equal as DC-voltage over same resistance for same power disppased.


In time discrete way, using square of input signal value (eg. make power-slice of sampel), integrate over the time (sum value of couple of power-slice, ex 256 sampel) and take out 1 sampel part of power in sum of power-slice (1/256 of sum value - ie median value) and take square root of this value and you have RMS voltage for this aktual 256 sampel window..


you need also take away exactly same amount of power from sum you put in 256 step before - ie need remember 256 sampel value ala fifo.. - or sum value run up like KWh-meter... or you need make discharge routin for sum as simular RC-circurits or higer order filter (lot of float-number calculate...)


- or using analog voltage to RMS-converter circurit before PIC input - is using analog quadratic circurit (and also handle very high frequency without aliasing problem compare to sampel rate ala PIC), RC-circurit/intergrator to make intergration of power and also discharge of this on 'natural' time-discrete way, and analog square root-circurit last step to give RMS-value out.




/xxargs
Back to top
smxx



Joined: 18 Aug 2005
Posts: 188
Helped: 8
Location: iran(ahwaz)


Post18 Dec 2005 8:07   

Measure RMS


hi
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
Back to top
Eric Best



Joined: 03 Sep 2001
Posts: 57
Helped: 12


Post18 Dec 2005 21:14   

Re: Measure RMS


rms value can be measured beforehand by hardware using one of available rms converters from Maxim or Analog Devices like AD736, 737 etc. although in this case I think it would be luxury

Best Regards
Eric
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> Measure RMS
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
measure true rms (2)
How to measure AC current RMS value? (13)
Why does the voltmeter measure the rms value of voltage? (2)
Why does the voltmeter measure the rms value of voltage? (1)
RMS mmt VS True RMS mmt (1)
RMS vs PMPO (25)
rms to dc converter (6)
rms to dc converter (2)
RMS Noise (6)
rms Application (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS