Discussion:
How do I get a steady DC RMS value from a pwm signal?
(too old to reply)
Enviro Engineer
2008-07-23 23:10:07 UTC
Permalink
I have a motor controller circuit and Im trying to measure the ammount of switching going to a motor with my DAQ.  The signal I need to measure resembles a PWM signal but it varies in frequency instead of pulse width.  I would like to monitor the signal with Lab view.  Currently, Im using a DAQ 6009 to measure that PWM signal as an RMS voltage.  However this method is very inconsistant.  Can anyone help me with a way to monitor this pwm signal?  The idea is to be able to tell when the motor reaches a certain speed threshold.    
Henrik Volkers
2008-07-24 13:10:09 UTC
Permalink
The DAQ 6009 has a timer, so why not measure the frequency?  Use an analog LP with a high timeconstant?Do some digital filtering with the sampled data, LP or median or ???My crystal ball is in maintanance .... :smileywink:   so please provide more information about your needs.How is your signal looking like? Spikes? Frequency range? How fast do need to tell the crossing of the threshold?
Enviro Engineer
2008-07-24 14:10:11 UTC
Permalink
Proven Active Veteran<img height="8 alt=" src="Loading Image..." width="150" border="0"> <a href="http://forums.ni.com/ni/view_profile?user.id=5747" target="_blank"><img height="36 alt= Henrik Volkers" src="Loading Image..." width="36" border="2"></a>
Message <a href="http://forums.ni.com/ni/board/message?board.id=250&amp;view=by_date_ascending&amp;message.id=41791#M41791" target="_blank"> 2 </a> of 2 <img height="6 src= http://forums.ni.com/i/p.gif" width="1"> Viewed 4 times
<img height="1 alt=" src="http://forums.ni.com/i/p.gif" width="1" border="0">

Thank you for your fast response.&nbsp;
I am using the counter already for another part of this project, can I use it again?&nbsp; I did not try using an analog&nbsp;LOW PASS FILTER or the digital filtering.
My signal is&nbsp;like a square wave with a 95% duty cycle most of the time.&nbsp; I want to detect when this wave&nbsp;changes to&nbsp;maybe 75%&nbsp;or lower.&nbsp; But like I said the circuit is actually a PFM circuit because it only changes the On time.&nbsp; This in turn&nbsp;changes the frequency, and unfortunately changes the sampling rate&nbsp;needed to get a&nbsp;consistant RMS voltage.&nbsp;
The&nbsp;checking speed can be relatively slow.&nbsp; Im currently&nbsp;waiting up to&nbsp;10 seconds to detect a change in voltage.
&nbsp;
S_Hong
2008-07-25 02:40:07 UTC
Permalink
Hi Enviro Engineer,
&nbsp;
Unfortunately you won't be able to do a frequency measurement task with your USB-6009. However, you may be able to simply acquire your data and use the Cycle Average &amp; RMS VI which can be found in your Functions palette under Signal Processing » Wfm Measure. I believe that this may be the VI you are looking for as it essentially allows you to measure the average and RMS levels of a selected cycle of a periodic waveform or an array of periodic waveforms.
&nbsp;
I hope this helps,
Henrik Volkers
2008-07-25 14:40:10 UTC
Permalink
the pulse measurements.vi in your Functions palette under Signal Processing » Wfm Measure can might give you exactly what you want :smileyhappy:&nbsp;&nbsp; read the help for the vi to see if it fit's your needs might because my crystal ball is currently on calibration, so I don't know the PFM frequence range nor your sample rate :smileywink:The analog filter is an R (10k -100k) from your PFM to AnalogIN of the DAQ and a C (100n-10µ? sorry no cristal ball) from that AnalogIN to ground.&nbsp; Use it in case your samplerate is far to low.
Loading...