Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Accelerator as a vibration sensor?

    Scheduled Pinned Locked Moved Discussion
    accelerometer
    7 Posts 4 Posters 704 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      misterlisty
      last edited by

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

      1 Reply Last reply Reply Quote 0
      • rcolisteteR Offline
        rcolistete
        last edited by

        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.

        My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          misterlisty @rcolistete
          last edited by

          Can the py handle these calculations?

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            jcaron @misterlisty
            last edited by

            @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?

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              misterlisty @jcaron
              last edited by

              @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.

              C J 2 Replies Last reply Reply Quote 0
              • C Offline
                crumble @misterlisty
                last edited by

                @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.

                1 Reply Last reply Reply Quote 0
                • J Offline
                  jcaron @misterlisty
                  last edited by

                  @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.

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • 1 / 1
                  • First post
                    Last post

                  Pycom on Twitter

                  Pycom