Shop OBEX P1 Docs P2 Docs Learn Events
Problems reading from accelerometer — Parallax Forums

Problems reading from accelerometer

trannhtrannh Posts: 24
edited 2012-06-01 14:27 in BASIC Stamp
Here is the program I am trying to run. Everything runs perfect except for the acceleration values. They are not outputting the correct values I think. I am using the MMA7455L 3-axis accelerometer from Parallax. Can someone please help me figure out the problem as soon as possible? I would greatly appreciate the help.

Comments

  • FranciscoTavaresFranciscoTavares Posts: 27
    edited 2012-06-01 12:37
    I´m having a problem with acceleration values as well. The values changes too much even when the device is not moving.
    I tried to adjust ofsets


    Offset values FOR each axis:
    'Offset values FOR each axis:
    XCal CON 25 'VAR Word
    YCal CON 80 'VAR word
    ZCal CON 0 'VAR Word


    but even so the values for XAccel changes like these ones captured from my accelerometer (see atached figure):
    943 x 563 - 295K
  • ercoerco Posts: 20,257
    edited 2012-06-01 14:27
    AFAIK, a narrow range of numbers (as your screenshot shows) is normal. You have to sample rapidly, take lots of moving averages, and use filters to get fairly accurate trends.
Sign In or Register to comment.