Connecting 3 BNO055 Orientation Sensors to a Arduino Mega

Hi,

Just as some background on me and my general inadequacy when it comes to electronics; I'm a Mech Eng student doing his final year dissertation on the gait of humans. I have been tasked with the production of a sensor rig comprised of a Arduino mega and 3 BNO055 sensors to map peoples gait. This is where my problems start.

I have no idea how to connect 3 sensors and have them read at the same time. I've connected one using the wiring guide provided by adafruit. I have an idea on how to wire the 2nd up using the ADR pin. But I have two large issues:

1) I have no idea how to connect the third sensor 2) I have no idea how to code the 3 two work in tandem with each other so that I can map the orientation of peoples thigh, calf, and foot movements.

I have asked my supervisors and the people in the electronics dept how to go about this but their answers tend to be vague and it seems that they're working of the basis that I know anything to do with programming, which I don't. I thought I'd come here and see if anyone would be willing to help me out, point me to the answers, or spell it out for me (as bad as that sounds). I am just looking for anyone willing to point me in the right direction so i can get this thing working.

Many Thanks in advance

kuurgon111: I have no idea how to connect 3 sensors and have them read at the same time.

It is impossible for the sensors to be polled/report data at the same exact time. You can poll each sensor in quick succession and it will seem that the measurements will be at the same time.

From the Adafruit website:

ADR: Set this pin high to change the default I2C address for the BNO055 if you need to connect two ICs on the same I2C bus. The default address is 0x28. If this pin is connected to 3V, the address will be 0x29

Looks like you will need a second I2C bus to handle the third BNO055 - you can only have at most 2 BNO055 sensors on a single I2C bus.

You have 4 options: - Use a different sensor - Use less BNO055s - Use a software serial I2C bus - Use a Teensy 3.X or some other MCU that has multiple hardware I2C ports

You may be able to use multiple sensors on the same I2C bus, at the expense of an MCU digital pin per sensor, to drive the address select pin on the sensor.
You’d have to experiment to find out

(probably five options then)

Could I use a multiplexer chip as described in this video ?

https://www.youtube.com/watch?v=zzieeHmFSis

or does that only work because they are outputs

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html .

Have you exhausted the knowledge base of your school? There must be a lecturer or instructor who can help you, that is their job. Although microcontrollers is not you field, the school must be teaching it?

Asking on campus sources would be better as it shows that you are learning, getting info from here to develop your project is fine, but your efforts here will go un-noticed to the people who you are hoping to please. Whereas any info seeking on campus will.

You have been set a steep learning curve.

Have you done any Arduino coding yet, have you got the IDE setup? You will have to get started with the basics, before getting code involving sensors working.

Thanks.. Tom.. :)

Hi,

I am trying to code 3 BNO055

Hi,

I am trying to code 3 BNO055's through a single I2C port. You can change the mem address of the BNO by supplying 3v to a pin ADR: 'Set this pin high to change the default I2C address for the BNO055 if you need to connect two ICs on the same I2C bus. The default address is 0x28. If this pin is connected to 3V, the address will be 0x29'.

Someone had an idea on a long since dead thread to hook the ADR up to an output port on the Arduino, and write your code so that only one BNO055 of the three is addressed at any one time.

Just wondering how this could be done, can 3v be supplied by an output pin, and can I choose which sensor the 3v is supplied to via coding?

Many Thanks

(deleted)

(deleted)

spycatcher2k: GOOGLE : I2C multiplexer

Can you multiplex input signals?

(deleted)

@kuurgon111, please do not cross-post. Threads merged.

Ditto.

[quote author=Coding Badly link=msg=4044863 date=1549232332] @kuurgon111, please do not cross-post. Threads merged.

[/quote]

It was the same topic but a different question, I went and did some research on the breakout board and the forums to see if anyone had a similar issue. Found a thread that had a solution that I wanted to see if anyone could clarify, its not the same question but asked elsewhere.

There are some stark differences in the questions asked:

thread 1 was me with no idea looking for general advice's on how to proceed, and to see if anyone had any general solutions to my problem.

Thread 2 was me asking if anyone had an idea of how to change which board the 3v3 pin was driving if they were all connected at once.

I know I'm new and initially my post was far to vague and open ended but it would be nice if people could actually read the content of the post rather that just assume I'm trying to copypasta a question into different topics

While you could use output pins to control the I2C address, there is another issue the has not been mentioned. The BN0055 is a 3.3 volt maximum device, the the Mega is 5 volt only. That difference will require the use of bidirectional level translator and the addressing line will need that same level translation, adding to the total wiring required.

For my 2 cents, the simplest solution is an I2C multiplexer and a level translator. Links to appropriate devices:

https://www.adafruit.com/product/2717

https://www.adafruit.com/product/757

Or remove/disconnect the pullup to 5V resistors on the Mega, and add your own pullups to 3.3V.

The Adafruit breakout of the BNO055 has a regulator and level shifters on board, so it is fully compatible with 5V Arduinos. Currently out of stock, though.

There should be no need for an I2C multiplexer. Just connect the three I2C_ADDR pins to available Arduino outputs, and make sure that the output pins are set so that only one BNO055 has the I2C address of 0x28 at a time. You MUST USE a 4.7K resistor between the output pin and the BNO055 address input pin to protect it from the 5V Arduino output voltage, as the breakout board has 10K from the I2C_ADDR pin to GND.

See the BNO055 data sheet for the details on selecting the device address.

Newer chips such as the SAMD21 support more than 1 hardware i2c controller. It might be possible to connect two IMUs on 1 i2c controller and the third on a different i2c controller.

Some interesting articles on DIY motion capture using IMUs.