Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to calculate True RMS of Cause/Square Wave in Assembly?

Status
Not open for further replies.

tectona

Member level 2
Joined
Mar 24, 2006
Messages
53
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,286
Activity points
1,602
How Calcaulate True RMS

Hi,

I want to calculate True RMS(Root Means Square) of Cause Square or Square Wave in Assembly Language of PIC 16F72.

Tectona
 

Re: How Calcaulate True RMS

Calculating the RMS Value:
The calculation works like this:
1. Take the waveform and divide it into a “large” number of individual increments
2. For each increment, SQUARE the voltage value.
3. Sum these squared values over all increments and then calculate their MEAN value.
4. Take the square ROOT of this mean.
That’s how you get the Root-Mean-Square value!

Neither this above procedure nor the formula given below can be practically realized with small microcontrollers such as PIC16F72 with its very limited math powers .. it is just not feasible ..

Maybe you should try Micromega Corporation uM-FPU (v2) 32-bit floating point coprocessor at: https://www.micromegacorp.com/picaxe.html

Regards,
IanP
 

    tectona

    Points: 2
    Helpful Answer Positive Rating
How Calcaulate True RMS

Check out microchip app notes 575 and 660 for floating point support. The code should fit into your controller (if you sort through what you need) to implement what Ianp suggests.

-jonathan
 

Re: How Calcaulate True RMS

tectona said:
I want to calculate True RMS(Root Means Square) of Square Wave in Assembly Language of PIC 16F72.

For a pure square wave:

**broken link removed**

1. Square waves: Like sine waves, square waves are described in terms of period, frequency and amplitude:
Peak amplitude, Vp , and peak-to-peak amplitude, Vpp , are measured as you might expect. However, the rms amplitude, Vrms , is greater than that of a sine wave. Remember that the rms amplitude is the DC voltage which will deliver the same power as the signal. If a square wave supply is connected across a lamp, the current flows first one way and then the other. The current switches direction but its magnitude remains the same. In other words, the square wave delivers its maximum power throughout the cycle so that Vrms is equal to Vp . (If this is confusing, don't worry, the rms amplitude of a square wave is not something you need to think about very often.)
 

    tectona

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top