Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BNO055_Read Accelerometer,Magnetometer,Gyroscope data on UART

    BNO055_Read Accelerometer,Magnetometer,Gyroscope data on UART

    Arunraj
    Member

    Hi,

    I am using BNO055 for reading the yaw,pitch and roll values. How do i read this orientation using UART protocol. I went through the datasheet,seems like we need to send a register read command mentioning the register address and length of data. I am trying the same but not able to read data. Do i need to set the protocol selection to UART first? Is there any precondition to be followed for reading values from register. Am i missing something here.

    Is there any API or LabVIEW drivers available?

    Please guide me through, any quick help would be highly appreciated.

    14 REPLIES 14

    Vincent
    Community Moderator
    Community Moderator

    You need to configure the pin 5 (PS1 = VDDIO) and pin 6 (PS0 = GNDIO) correctly before power on the sensor to select the UART interface. 

    There is no precondition to communicate with sensor under UART interface.

    I put one application notes for BNO055 UART interface for your reference.

    Also, there is one Arduino example code for BNO055 UART,  since Community only accept certain attachment,  i copy the Arduino example to word file for easy read. 

    Hi Vincent,

    Thanks for the reply.

    I went through the UART doc and Arduino example code shared.

    1.Observed Port is initialised @115200bps and operation mode is set first in initialise by sending command {0xAA,0x00,0x3D,1,0x01}and reading the feedback.

    2.I am also sending the same command through my labview code but  facing issues in geting acknowledgement response for sent write command.

    3.Trying to set the page to 0 by sending command {0xAA, 0x00,0x07,0x01,0x00},no response received.

    4.Trying to read calibration data by sending command {0xAA, 0x01,0x35,0x01},no response received.

    5.Tried to monitor the data  sent by Bosch Development desktop 2.0 using serial port monitor application and exported dump during initialise before streaming of data is started.Observed the command sent are different.I am not able to correlate those commands with the UART doc or datasheet .I have attached data dump.

    6.Tried to send the command in the init dump file and i get the same response as in the dump using my sample code.So UART communication is not an issue i presume.

    7.Observed from the dump that there are termination characters 0x0d 0x0a . Do we need to send these termination characters along with the write/read command?

    Here,I am not able to relate what exactly are these commands for.It would be very helpful if you provide me some insight by looking at the init dump what exactly are these commamds doing.

    Vincent
    Community Moderator
    Community Moderator

    What is exactly your HW setup here? 

    DD2.0 is designed to talk to our sensor shuttle via the APP2.0 board (or BNO USB stick).  So the UART protocol with DD2.0 is not exactly the UART protocol of BNO055.   There is one Atmel MCU on those two boards,  all UART communication is sending to Atmel MCU first,  then use I2C interface to communicate to BNO055 on the board.  We have special FW running on those boards which is not open source so i can't tell you the detail bits meaning of the init_dump. 

    BNO055 can be configured directly as UART protocol which is given in previously attachment.  BNO055 is support 115200 and 8N1 settings.  So the host need to be configured as that.  After successfully configure the host,  then send the corresponding bits,  you should able to get the responding from sensor directly. 

    So  please make sure,  you are talking to BNO055 UART interface directly not the UART interface of APP2.0 board.

    Can the state of the protocol select pins(PS0 and PS1)  be set via commands or do we  need to connect respective pins to GND and VDDIO in the BNO055 board ?

    I came across Generic API user manual , using the UserApplicationBoard.dll i am able to read the information like SID, HWID, SWID and Board type using GetBoardInfo(). I am also able to read the registers in the page 0 by using functional call Read (int registerAddress, ushort numberofReads).

    I am not able to set the page to 1 and read the registers in page 1.Is there any function available to  set page in generic API.I need to read registers from page 1 also.

    Came across function PinConfig(int pinNumber, EONOFF switchState, PINMODE direction, PINLEVEL outputState).Is it possible to set protocol select pins PS1 (pin no 5) and PS0(pin no6) to high and low state using this. I tried  by calling as PinConfig(5,HIGH,INPUT,HIGH) and PinConfig(6,LOW,INPUT,HIGH),still could not read calib data in host using serial .Serial settings are set to 115200 and 8N1.Is the arguments passed to the function correct? I am not sure on "EONOFF switchState, PINMODE direction, PINLEVEL outputState" .

    How do i read burst data  of all 3 sensors simultaneously using the generic API ? Reading registers with no of reads argument takes a lot of time and i need to stream the data continously.

    Will setting PS1 and PS0 make sure that we are talking to BNO055 UART interface and not the APP 2.0 board.I am using BNO055 USB stick connected via extended USB cable to my laptop.

    Please guide.

    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