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.

RMS value measurement

Status
Not open for further replies.

otuzsubat

Member level 4
Joined
Jun 7, 2004
Messages
72
Helped
7
Reputation
14
Reaction score
5
Trophy points
1,288
Location
istanbul, Turkey
Activity points
668
There is a signal just like below. I need to measure the RMS value of it. How can i succeed this using PIC microcontroller?
 

Start with the definition of RMS. Square root of (the mean [average] of (the square of the signal))

You already know the square is either 2500 or 0. To find the mean you only need to find the fraction of time the signal is high. This can be done by sampling over time. Then multiply this fraction by 2500. Then take the square root. This can be either a full math procedure, or an approximation from a lookup table and some linear interpolation.
 

Hi

It's simple use RMS to DC converter IC you can found on in analog device site

www.analog.com


All the best

Bobi
 

Hi !

Of course you have to adequate the 50V peak voltage signal to the input voltage limit of ports of the PICmicros (if Vdd = 5V, then the upper limit is 5V for the A/D analog or digital inputs). Use a voltage divider (1:10).
Another restriction is the sample frequency if you are going to use the A/D converters of common PICs (16F and 18F series), you won´t get more than 40ksamples/s (some dsPIC reach 500ksamples/s) what can introduce errors if the frequency of measured signal is too high (you did not say what is the frequency). For low frequencies, it is ok, but the math routines may spend a lot of processing.
Another idea is to keep pooling the input signal periodically (at regular and precise intervals of time) and check if the input level is high or low (just logic levels, which come from the voltage divider) and make the calculations of average of time x logic levels. It won´t need of A/D converter and you can have high speed.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top