Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    BMA253 orient theta in Orientation Recognition

    BMA253 orient theta in Orientation Recognition

    New Poster


    I am using BMA253.

    I have set the orientation configuration as below.

    orientation mode to symmetrical

    orientation hysteresis to +/-10 degrees.

    orientation theta to 45 degrees.

    orientation_up_en to false


    if I set orientation updown enable to true, the orientation interrupt triggered but it wasn't what I wanted to achieve.

    I wanted to know the upward looking and down ward looking when the device is tilted over 45 degrees.

    Or when the device is in the blocking theta for the X-Y plane's orientation interrupt.

    Is there a way to do it?

    Flat detection seems it works when the z-axis is in +1g direction only, and doesn't work on the -1g direction.

    Thank you in advance.

    3 REPLIES 3

    Community Moderator
    Community Moderator


    Thanks for your inquiry.

    Please see the attached two PDF files about BMA253 orientation and flat interrupts.



    Thank you for the reply.

    It is kind of confusing, but I will try my best to explain.

    The "How to use BMA253 orientation interrupt for screen rotation.pdf" says orient_theta blocks the interrupt for X-Y plane rotation.

    But not for the z-axis.( I am not sure )

    The upward looking and downward looking reflects whether acc_z is positive or negative.

    I have a image that I took during my actual rotation of the device.

    image2.png is rotation from Portrait upright to Landscape left, and it results the same as what I wanted to achieve. 

    image1.png is tilting the device at a Portrait upright position, and is doesn't result the way I wanted.

    It seems that in image1.jpg, I can't change when the orientation interrupt to happen.

    I would be glad to know if I can change the orientation interrupt timing for upward looking or downward looking.


    Community Moderator
    Community Moderator


    BMA253 orientation interrupt gives you rough estimation if the device has changed its orientation or not. Since you can get BMA253 x/y/z data at the same time, you can quickly calculate the pitch and roll angle to verify the real current orientation after the orientation interrupt is generated. Then you can determine if you need to change the screen orientation or not.

    Please fine tune the parameters such as theta, hysteresis, etc. to achieve what you really want.