LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring dc current frequency

Am beginning to investigate a new feature requested for one of my test systems and while I have a high level plan on what I want to do, I will need to perform some trials to determine the nuts and bolts of the test.

 

Basically, I will want to be able to read the frequency of the dc current being fed into a brush motor.  I know I can get the current by reading the voltage drop across a precision resistor.  And I figure I can develop a vi to read the waveform of the current and then develop what I need to return the frequency.

 

I guess the real question is, would there be any use of a counter in this to simplify the things or would it be pretty much software driven for what I am trying to do.

 

I am working with a USB-6221 that has two counter / timers on board

 

Any thoughts are appreciated.......

 

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 1 of 10
(3,262 Views)

I Think you might have some details to add to help us understand what you want.

 

As far as I know the frequency of any DC signal should be just about 0.00 e-inf Hz (but I haven't been around long enough to have measured it.)


"Should be" isn't "Is" -Jay
Message 2 of 10
(3,249 Views)

I am not sure what you mean by the frequency of "DC current". There is no frequency component of DC. I am assuming that you mean mean that you want to measure the frequency of a PWM signal. 

 

Measuring the voltage accross a resistor is one way, however you will have significant power loss depending on the magnitidue of the power drawn by the motor. 

 

Another meathod would be to use a current sensor that measures the magnetic field created by the current that will either output an analog voltage or a digital signal based on a threashold. 

 

The decision to use hardware or software to measure the frequency really depends on the signal being measured. Assuming your expected signal is around 20 kHz, then either method would work fine.

0 Kudos
Message 3 of 10
(3,244 Views)

The thought behind this is that as the brush motor rotates, the current fluctuates (however minutely) as the brushes go from pole to pole on the commutator and as the activated coils pass by the magnets.

 

I agree in that the signal will be on the flat side but I am hoping to be able to pick up whatever waveform is produced.  The 6221 may not have the horsepower to decipher that small or fast of a wave but being that is what I have at the moment, it will be my first lab experiment.

 

My motor is a 2 pole brush motor and is going to be spinning upwards of 8000+ rpm's.

 

That make any more sense ?

 

 

 

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 4 of 10
(3,243 Views)

A little more on this...

 

This is actually being accomplished with a frequency detector that has been customized at a chinese factory.  I will never be able to see this device but it is what the factory is using to measure the speed of the motors in their assembly process.

 

I am pretty certain this can be accomplished in LV as on another test system, I am using the current graph to compute actuation time for a solenoid valve.  When dc voltage is applied to the solenoid coil, the current rushes in until the armature begins to move. The current then drops while the armature is moving then spikes back to full power once the armature is seated (solenoid is actuated and valve is opened)

 

The actuation time is the point right before the current begins rising the second time.  Very reliable method to measure actuation time.

 

For a brush motor, assuming the motor does not stall, there should never be a time when the current is truly static.  Therefore, if I can capture the waveform of the current, I will be able to calculate the motor speed.

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 5 of 10
(3,241 Views)

Test update

 

Have made the simplest of tests by just graphing the voltage drop across a resistor in the circuit with the motor.  Pulling a signal of 10k samples at 50kHz to get this waveform.  This is a .025 second window.  A "rough" calculation of approximately 4 cycles per .025 seconds gets me around 9600 cycles per minute and a strobe measurement on my motor shows around 9800 rpm's so I'm in the ballpark for sure.

 

Motor_Waveform.png

 

Definately a pattern there so may not even need to convert to current to get what I want.  This is just a free running motor though and I need to test motors under load and my loads are reciprocting radial loads that just wreck havoc on nice clean signals. (I have mapped other units with a rotary encoder before and there can be a 50% or greater change in motor speed during a single revolution.)

 

So now the part that I have never worked with before is pulling the frequency of the pattern out of a waveform like this.  If this is an indication, the highest series of peaks is only a little greater than the next highest interim peak (with two lower peaks between on either side)

 

So if someone can point me in a direction for pattern detection that would be great.

 

Thanks.....

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 6 of 10
(3,226 Views)

That signal is a good candidate for extracting a frequency. Have you tried running an FFT on it?

0 Kudos
Message 7 of 10
(3,213 Views)

If you can capacitively couple the signal from the current sense resistor before digitizing, you can adjust the full scale range of the DAQ device to get as much resolution on the AC component as possible.

 

I agree that an FFT approach is probably a good place to start. If the frequency is shifting rapidly, the FFT may show a broad band of frequencies rather than specific individual lines.  Do you need "instantaneous" frequencies or some kind of average over the rotation period?

 

Lynn

0 Kudos
Message 8 of 10
(3,207 Views)

Yea, this is where my skills will fall short.  I'm not that familiar with waveform / signal analysis. Sure I can spend some time playing with all the confusing vi's but am hoping for a little guidence on this.

 

Did a quick test on a fully loaded unit this morning and while a pattern is still there, it is not as distinct as the raw motor waveform.

 

Motor_Waveform_Loaded.png

 

Certainly playing with # samples and frequency might make this a bit cleaner looking but the the pattern is not as distinct.  It appears that the patterns hit six peaks before starting to repeat.  That makes sense in that the motor I am testing is a two pole motor with three coils.  If this were a perfect motor, I would expect to see all six peaks equal but since there are going to be small variations in the coil windings and in the flux energy of the two magnets, this makes the pattern visible.

 

What convolutes this further on the loaded unit is that the reciprocating load will have random phasing relative to the motor coils and that could either amplify or dilute the natural motor coil/magnet variation of the motor. ( won't even get into the 8 pole motors here)

 

Perhaps it might be a simpler approach to simply obtain a count of all the peaks and dived by a constant based on the motor design.

 

Again,  analyzing waveforms / data is not something I have any real experience with so am hoping someone could tell me what tools I should start playing with.  There are three different FFT tools and I don't understand what the difference is in them.  Just not my area of expertise.

 

Thanks for any continued input.....

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 9 of 10
(3,189 Views)

@johnsold wrote:

If you can capacitively couple the signal from the current sense resistor before digitizing, you can adjust the full scale range of the DAQ device to get as much resolution on the AC component as possible.

 

 

Lynn



Not sure what you mean by capacitively couple.  Electrical is not my strongest suit.

Doug

"My only wish is that I am capable of learning each and every day until my last breath."
0 Kudos
Message 10 of 10
(3,188 Views)