No announcement yet.

Accelerometer and Noise Filtering (Moving Average Example)

  • Filter
  • Time
  • Show
Clear All
new posts

  • Accelerometer and Noise Filtering (Moving Average Example)

    Often times, in data collection, the raw data is rather noisy. In the figure below, I have connected all 3 axes of our accelerometer to our board, and set the board to log every 100mS.

    I then moved the accelerometer through a serious of orientations, such that acceleration due to gravity (1 G) was sensed on each of the axes. As you can see, the resulting data was quite noisy.

    However, we can apply a moving average to the data inside the MDX software as follows:
          <iochannel id="Port9" port="9" brain="TestBrain1" type="analogue_input">
            <options history="10" auto_average="true"></options>
    Note the options history and auto average. Options history specifies how many of the past parameters to hold in memory when performing the averaging calculation. For example, in this case:

    Value _new = (Value1 + Value2 + Value3 + Value4 + Value5 + Value6 + Value7 + Value8 + Value9 + Value10) / 10

    where values 1-10 are the past 10 measured values, respectively.

    Then, the accelerometer is put through a range of motions, as shown below:

    The units are 100mS and G-force.

    Hope this helps! Post any questions.

  • #2
    Originally posted by greenman100 View Post
    Hope this helps! Post any questions.
    Great post...thanks for the tips!

    An amateur built the Ark. The Titanic was built by professionals.


    • #3
      Sorry for so many questions

      "The Fusion Accelerometer is accurate up to +/- 6G's."
      Is that the reading range or the accuracy? I know that the accelerometer the Wii remotes use have a reading range of +/- 3G's with an accuracy of 10%.


      • #4
        reading range.

        It is accurate up to +/- 6Gs, and after that it is not.
        Fusion Brain Version 6 Released!
        1.9in x 2.9in -- 47mm x 73mm
        30 Digital Outputs -- Directly drive a relay
        15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
        Buy now in the Store