Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    Need some guidelines for BMI270 accel and gyro FOC

    Need some guidelines for BMI270 accel and gyro FOC

    Ragu
    New Poster

    Hi all, 

            I am using BMI270 shuttle board 3.0 using the SPI interface and I can able to read accel and gyro values. But I need to develop code using FOC for that I used example code present in the BMI270-Sensor-API-master library in the git hub. The code is attached to my environment and works with errors. In that I need a few explanations on putting the sensor in the right position and keeping the sensor in the wrong position.

    What does it mean to keep BMI270 in the right or wrong position? And I am facing OUT OF RANGE ERROR also.

    I am new to this BMI270 sensor so I need help with that. Any help would be appreciated.

    Thanks in advance.

    With Regards,

    Ragu.

    3 REPLIES 3

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Ragu,

    Do you mean you run github code https://github.com/boschsensortec/BMI270-Sensor-API/blob/master/bmi270_examples/gyro_foc/gyro_foc.c?

    What problems have you encountered? Could you describe it in detail when you use BMI270?

    Hi Robin,
    yeah, I use the same code in github code https://github.com/boschsensortec/BMI270-Sensor-API/blob/master/bmi270_examples/gyro_foc/gyro_foc.c
    The issue I am facing is, the code asks for two inputs from the user
    1) Shake the sensor
    2) Keep sensor stable in right position

    First operation: shake the sensor:
    I started to shake the sensor and the perform_foc_range_test function result is BMI2_OK( Valid input - Sensor is shaking.)

    Second operation: Keep sensor stable in right position
    I leave the sensor stable(not even touching it). In that case I get BMI2_E_OUT_OF_RANGE(-4) as a result.
    So, I need to know is any specific position there to done this.
    I need clarity on what is the right position. And same thing for accel_foc.c also.

    Thanks,

    P. Ragu.

     

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Ragu,

    Sorry for the delayed reply.
    The FOC is made to calibrate the offset, which requires the still sensor to read the sensor offset and calibrate it. When performing gyro FOC test, the sensor should be stationary, not shaken. The code has misunderstanding.

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist