Measuring vibration | LabJack
 

Measuring vibration

6 posts / 0 new
Last post
SteveK
SteveK's picture
Measuring vibration

I wold like to use a T7 or UE9 to measure the vibration on an electric motor and some attached devices in order to detect abnormal situations.

I looked at accelerometers such as this:

http://www.strainsense.co.uk/products/dc-output-quick-delivery-accelerom...

But it is not obvious to me how signal from these would be translated to 'vibration'.  I presume I get would get 3 voltages relating to 3 axis angles and that these will fluctuate as the motor shakes.  But how to convert this to some overall value of 'vibration' - I don't need an absolute measure, just to be able to detect changes.  Has anyone done this? It would be nice if some sort of integration could be done on board so that my application can periodically ping the labjack for  the current value rather than having to harvest a bunch of values over ethernet at high frequency over a few seconds and do some analyis remotely.

 

Any ideas appreciated

 

Thanks

 

LabJack Support
LabJack Support's picture
You want the T7 (or T7-Pro)

You want the T7 (or T7-Pro) over the UE9.

Looks like a great sensor.  It provides signals that vary from 0.5 to 4.5 volts for -2 g to +2 g, or similar span for the +/-6 g version.  Might be something to add to our Accelerometers app note:

https://labjack.com/support/app-notes/accelerometers

The power supply range is stated as 5 to 30 volts.  Ask StrainSense if the minimum is actually 5.0, or if the sensor works with a standard 5.0 +/-5% power supply (4.75 - 5.25 volts).  If 5.0 is the minimum, you can still power from VS on the T7 but need to make sure the power supply you use is keeping VS at 5.0 or greater.  Probably use an extra analog input to monitor VS.

The sensor works from 0 to 200 Hz.  Does that cover the vibration you are interested in?

 

But it is not obvious to me how signal from these would be translated to 'vibration'.  I presume I get would get 3 voltages relating to 3 axis angles and that these will fluctuate as the motor shakes.  But how to convert this to some overall value of 'vibration' - I don't need an absolute measure, just to be able to detect changes.

The proper technique would likely be to acquire a waveforms, do an FFT, and then note the magnitude and frequency of say your top 10 frequency components.  The you apply some logic for how you compare that data set to other data sets to decide if a change of interest has happened.

A shortcut might be to simply look at the overall magnitude of the signal.  The max-min over some time period.  If it is normally swinging about 2 g, and then later you notice it is swinging about 3 g, you say there has been a change.

 

It would be nice if some sort of integration could be done on board so that my application can periodically ping the labjack for  the current value rather than having to harvest a bunch of values over ethernet at high frequency over a few seconds and do some analyis remotely.

First consideration is to use the Average Min Max AIN-EF:

https://labjack.com/support/datasheets/t-series/ain/extended-features/av...

You ask for a reading, and when ready the T7 returns the min and max.  Problem is that this feature has a time limit of 180 ms, so really only useful for frequencies of 5.6 Hz and higher.  If you think lower frequencies might be important, you need to grab readings over a longer time interval.  So you probably want to make a Lua script that does this, either grabbing readings one at a time or doing multiple AIN-EF calls:

https://labjack.com/support/datasheets/t-series/lua-scripting

That is something that a Lua script is great for.  It can do a bunch of work continuously and just put some sort of summary values in USER_RAM that you read at your convenience.

 

SteveK
SteveK's picture
Thanks, that is very helpul.

Thanks, that is very helpul.

180ms is marginal for my purpose - I have fast spinning motors but also linked slow compressors which can vibrate at just a few Hz. I have not done any Lua scripting, looks like a good reason to start playing with it.  For now I will just collect the range over a couple of seconds, but doing it 'properly' would be nice.   Perhaps you could add an AIN-EF that does a FFT?!

LabJack Support
LabJack Support's picture
Lua scripting is an awesome

Lua scripting is an awesome feature.  If you try to do a large complex program you start to hit memory limitations pretty quick, but for a task like yours it is perfect.

We did look into adding FFT some time ago, but decided it was too much to fit in as a AIN-EF feature in hardware.  I'll mention it to a firmware guy again to see if he says anything different.

SteveK
SteveK's picture
I have started to look at

I have started to look at this.

I see you have done the hard work for me here: https://labjack.com/support/software/examples/lua-scripting/average-min-max

Thanks!  Since I will have 4 accelerometers each with 3 axes, I will need to multiplex that, I guess just holding values in arrays and iterating through them within the inner loop.

But, dumb question.  If I set my script to run on startup, it presumably just runs once. So do I need to put all the code into a while 1 do loop so that it loops constantly? That seems ugly! Is there a way to trigger it to run at intervals?

LabJack Support
LabJack Support's picture
You are +- correct with your

You are +- correct with your statement of "scripts will only run once" and that it is not periodically triggered.  If your script doesn't have a loop somewhere it will be executed until the end and then sit in a pending/nothing more to do state however the deviec will not un-load the script from RAM.  Take a look at the welcome screen example.  Run this script with and without the last line of code that writes a 0 to the LUA_RUN register.

 

The only current method for running script code at a particular interval is what you have found in that example aka using the set and check interval functions.  For a complete list of lua specific functions, please reference the lua scripting section of the t-series datasheet.