0

Hardware

  1. Arduino Nano

  2. XBee Pro S1 (802.15.4) Modules

  3. Adafruit BNO055 Absolute Orientation Sensor

Purpose

I want to send the Euler angles and Linear Acceleration angles to the a central XBee Coordinator (can be connected to a Computer or a Single Board Computer) every 100 ms

Since the BNO055 has SDA and SCL pins for I2C how will the performance of the Nano matter when sensor data is acquired from the BNO sensor and send to XBee module which will be connected to the Hardware Serial UART Port?

An interesting observation was that if one:

Shorts the PS1 pin to 3.3V for the BNO055, the SDA and SCL will function as RX and TX pins for UART. source

In terms of interfacing, I can think of the Xbee now connected to the Hardware Serial Port and perhaps the BNO sensor will can be connected to the Nano via SoftwareSerial port. But will that serve any better purpose in terms of performance and data acquisition i.e. using two Asynchronous Serial Ports compared to one?

asked Aug 9, 2017 at 18:20

1 Answer 1

1

All software serial solutions are much less efficient than HardwareSerial (i.e., Serial). SoftwareSerial is particularly bad, because it disables interrupts for long periods of time. 95% of the MCU time can be spent twiddling its thumbs, waiting for each bit to come in.

Using the I2C interface for the BNO055 means that the Arduino hardware will independently and concurrently handle each byte of data from the BNO055 and from Serial (i.e., the XBee). Your sketch can continue to do other things while each byte arrives. This is most efficient.

Software serial port libraries handle each bit of data, sometimes to the exclusion of all other activity.

answered Aug 9, 2017 at 18:48
2
  • So even though I2C being a synchronous serial protocol and UART being asynchronous; results might tend to be good in status quo than 2 asynch. modes on the Arduino. Commented Aug 9, 2017 at 18:59
  • 1
    @Shan-Desai, the processor load is much less with I2C+UART. Sync/asynch does not matter, because the peripherals (I2C controller and USART) operate independently from the CPU. It's like hardware-accelerated graphics vs. software rendering. Commented Aug 10, 2017 at 2:48

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.