absoluteIMU TILT readings greater that 128 (179-180)
 NXT and EV3   Started by Kevin Clague   2017-03-19 14:01:47 -04:00   Comments: 2    Viewed: 130

  1. Kevin Clague
    Kevin Clague Member
    I am using absoluteIMU using ev3dev plugged into sensor port 1.  The Users guide says that the TILT readings for any axis should be in the range from -127 to 128, and that zero should represent no tilt for an axis that is hoizontal.  

    Using ev3dev-c library to access the sensor in C and a little program to read tilt axis readings over and over.  When the X axis is pointing straight down, I get a reading of 0 for tilt-X, this seems to conflict with the description in the User Guide.  When the Y axis is pointing straight down, I get a reading of 0 for the tilt-Y.  When the Z axis is pointing straight down (the red face of the sensor is facing down and parallel to the floor, I get a reading of 177.   When I red face is point up (parallel with the ceiling), I also get readings of 177.  Given the range is supposed to be -127 to 128, and the value 177 is out of range, is this some sort of error condition?

    Bypassing the libev3dev-c stuff, the direct file system access to the device provides similar results with the sensor stationary and leveled in the horizontal plane:

    robot@ev3dev:~/imu$ cat /sys/class/lego-sensor/sensor0/value0


    robot@ev3dev:~/imu$ cat /sys/class/lego-sensor/sensor0/value1


    robot@ev3dev:~/imu$ cat /sys/class/lego-sensor/sensor0/value2


    User guide says the tilt readings should be zero in this case, yet none of them are zero.  Given the behavior of X and Y, I would expect Z to be zero in this case.

    I see out of range values for X and Y axis when I'm trying to hold the device in my hand.  I assume the tilt is computed based on accellerometer readings.  Does this out of range value mean we cannot trust the readings from the sensor for this sample?

    Kevin Clague, 2017-03-19 14:01:47 -04:00
  2. setht
    setht Member Staff Member
    Good morning! Could you please send a copy of the little program you ran, and any setup commands to configure the sensor in this state?
    setht, 2017-03-20 10:48:50 -04:00
  3. (You must log in or sign up to post here)

Log in | Sign up
Tems & Conditions!