11-04-2008 04:16 PM
11-05-2008 04:41 AM - edited 11-05-2008 04:42 AM
Hi ajh305,
Thanks for the post and I hope your well today!
What sort of problems are you having?
The setup? The take a look at this KnowledgeBase Article, With the basic idea being that current cannot be measured directly using the analog input of a DAQ board. However, if a known resistance is placed in series with the load and the voltage across it can be measured, the current through the load can be calculated using Ohm's Law (V = I x R).
Noise? You may be seeing the effects of aliasing. When measuring AC signals, you must sample at twice the input frequency or higher to obtain a fair time-domain representation of the input signal. This lower bound sampling rate is known as the Nyquist Frequency. If you do not sample at a rate higher or equal to the Nyquist Frequency, your signal will be aliased. The signal frequency may actually appear at a lower frequency than it should. In order to get a better time-domain representation of your signal, simply sample at higher rates.
Please let me know what you think,
Kind Regards,
11-05-2008 07:58 AM
11-06-2008 08:04 AM
Most AC measurements are best done by acquiring complete line cycles of data. So for instance, if you are measuring 60Hz, you should be acquiring your data in multiples of 16.667 mS.
11-06-2008 11:24 AM
Centerbolt:
To prevent aliasing, wouldn't you want to sample at a shorter interval than the period? If you happened to start sampling just as it crosses zero, all your readings would be zero. Suggest 10x for best resolution, sample at 600Hz or 0.0016 seconds.
It's not clear from the OP exactly what the problem is, need a bit more details here.
-Ak2DM
11-06-2008 11:40 AM
AnalogKid,
Yes, you still need to sample at a rate several times faster that the signal to prevent aliasing.
What I meant was that if you take a # of samples at a given rate, the waveform or array of data acquired represents a certain period of time. ( # samples * sample period ) This period of time should be setup to be a multiple of the period of the signal that you are trying to measure.
If you are sampling a 60Hz signal at 1KHz, you would want you # of samples to be a multiple of 17. That would produce data that represented complete cycles of the signal being measured.
11-06-2008 11:57 AM
Did a little more research on the particular method being used by ajh305 to calculate RMS. Zilog has a app note on this method. http://www.zilog.com/docs/z8encorexp/appnotes/an0216.pdf
Appears that the samples must be evenly spaced over a complete period of the signal being measured. Please note that this method assumes a sinusoidal signal.
11-06-2008 12:19 PM
Centerbolt:
Yes, now I see what you were saying initally, I fully agree. There are also chips on the market (Analog Devices) that make RMS to DC converters, I haven't used one of those in nearly 2 decades (time, not frequency domain :)).
I know there are some RMS functions in the non-Base version of LabVIEW but I never have used them. Haven't looked at the vi's posted.
-AK2DM
11-06-2008 01:29 PM
11-06-2008 01:45 PM
Exactly how are you sensing the AC current? Series resistor? If so the voltage developed is going to be AC and you will need to do a calculation similar to your AC voltage measurement. DC amps and AC amps cases in your vi look to be almost the same. I don't think that will work.