Accelerator as a vibration sensor?



  • Is it possible to use the accelerometer as a vibration sensor? Want to attach it to a motor to detect failure?



  • @misterlisty that’s about as vague as it gets...

    I recommend you start by reading the accelerometer’s datasheet to learn of its capabilities.

    An accelerometer detects just that: acceleration, and you can sample the acceleration values at regular intervals to try to detect all sorts of things. I believe you can even “stream” the values samples by the accelerometer. But high frequency vibrations for instance may be an issue as they may exceed the capabilities of the accelerometer. High sampling rates may also be an issue if you have lots of computations to perform.

    It’s really difficult to help you much further without any indication of what exactly you are trying to measure / detect, and what the threshold are.



  • @misterlisty said in Accelerator as a vibration sensor?:

    Just need a starting point to investigate these values.

    Depends on a lot of stuff you don't tell us.
    Shaking vs non shaking is easy. The part between complicated.

    Keep in mind that floats are implemented like strings as immutable objects. So the float performance is limited by memory and GC performance. You may have to rewrite your stuff to use int the core calculations. Python is not the fastest language at all. You can write your stuff in c and use the callcualtions form the python level.

    And the most important part at last: to be realtime or not to be. If it has not be realtime, you can take samples and check them. In this case you have to deal only with the small amount of memory.

    And don't forget the sample rate you need. Check that at first. Otherwise you may have a perfect solution for the wrong problem.



  • @jcaron Want to monitor vibrations of a motor to detect a failure. So a combination of the mentioned factors is required. Just need a starting point to investigate these values.



  • @misterlisty you probably want to define accurately what you want to measure and what is your trigger. Is it a matter of frequency, amplitude? Duration over a given threshold? Which threshold?



  • Can the py handle these calculations?



  • Yes, it is possible.
    It is just a matter of processing the accelerometer data (calculating stdev or FFT, etc)..
    But it is important to take into account the intrinsic noise of the accelerometer, So look at its datasheet.


 

Pycom on Twitter