Is it possible to connect 4 Razor IMUs with 1 single Arduino Mega 2560?

Hello,

Is it possible to connect 4 Razor IMUs with 1 single Arduino Mega 2560? 9 Degrees of Freedom - Razor IMU: https://www.sparkfun.com/products/10736

I mean, for example : 4 Razor IMUs Arduino Mega TX0 -------------TX0 RX1 -------------RX0 TX0 -------------TX1 RX1 -------------RX1 TX0 -------------TX2 RX1 -------------RX2 TX0 -------------TX3 RX1 -------------RX3

Or maybe 9 Degrees of Freedom - Sensor Stick x4 to one Arduino Mega? But Arduino Mega has only one SCL and one SDA... Basically I want to have 4 IMUs, like on two arms and on two legs, and one sigle Arduino Mega + XBee + Battery which is attached on the back. I would like to avoid having many things on the body of dancer, such as 4 IMUs and 4 Arduino Unos + XBees + Batteries.

Thank you for your attention.

First question - yes. The IMU has equivalent of an Uno onboard to manage the 3 sensors.
2nd question - yes, but need an I2C multiplexer if the Sensor Stick does not provide for different I2C addresses via onboard jumper or something.

3rd question - Xbee also uses Serial interface, so you may need Serial multiplexing to go with question #1. Or an RS485 buss & have all the serials multiplexed to one '2560 part.
Max488, Max489 kind of part for duplex comm’s.
Max485 kind of part for half duplexe comm’s.

Thank you for your reply.

CrossRoads: First question - yes. The IMU has equivalent of an Uno onboard to manage the 3 sensors.

Sorry if I am misunderstanding, but do you mean the Razor IMU has ATmega328 and ITG-3200 + ADXL345 + HMC5883L? I understood that it is possible to do the following:

4 Razor IMUs Arduino Mega TX0 -------------TX0 RX1 -------------RX0 TX0 -------------TX1 RX1 -------------RX1 TX0 -------------TX2 RX1 -------------RX2 TX0 -------------TX3 RX1 -------------RX3

However, I am now wondering if the 4 Razor IMUs are necessary for my project, unless using Bluetooth or XBee directly to each Razor IMU (which I do not want)...

2nd question - yes, but need an I2C multiplexer if the Sensor Stick does not provide for different I2C addresses via onboard jumper or something. http://www.dsscircuits.com/index.php/i2c-multiplexer

This looks quite interesting. I did not know this product. I searched for the examples of this i2c-multiplexer, but I didn't find any information in Internet. Did anyone already try this product, or does anyone know any examples, especially with the Sensor Stick?

3rd question - Xbee also uses Serial interface, so you may need Serial multiplexing to go with question #1. Or an RS485 buss & have all the serials multiplexed to one '2560 part. Max488, Max489 kind of part for duplex comm's. Max485 kind of part for half duplexe comm's. http://datasheets.maximintegrated.com/en/ds/MAX1487-MAX491.pdf

I didn't understand well. My idea is that 4 IMUs go to one Arduino Mega 2560, and then Xbee + Xbee Shield:

https://www.sparkfun.com/products/retired/8471

Do you mean that Serial multiplexing is necessary, because Xbee already uses one pair of TX and RX? If I add the RS485 Shield to the setting above (the 4 Razor IMUs -> one Arduino Mega 2560, and then Xbee + Xbee Shield), would it solve the problem?

https://www.sparkfun.com/products/11959

Thanks again.

Yes, IMU has a '328 - you can see on the picture and the 2nd page of the schematic

The RS485 shield you found would work; unfortunately the IMU does not use Arduino footprint - you should be able to find a smaller RS485 type adapter to wire up to the IMU.
A full duplex version of something like this

I2C Mux with SensorStick - do you have a link to Sensor Stick? I am not familiar with it.

Do you mean that Serial multiplexing is necessary, because Xbee already uses one pair of TX and RX?

Yes.
How good is your coding? If multiplexed, the 328 on the IMU would need some reprogramming to set up a protocol to let each one know when to send data out.
You might be better off with a Serial Port mux so the Mega would control which IMU it was talking to vs modifying the IMU code.
Two quad-AND gates and a quad-OR gates would do that:

A dual 4-port analog switch might also work - want the disabled outputs to be at the inactive level of the Tx pin, so a pullup or pull down could be needed. DG409 as an example - have to make sure the on-resistance is acceptable. http://www.digikey.com/product-detail/en/DG409DJ-E3/DG409DJ-E3-ND/2621725

I2C Mux with SensorStick - do you have a link to Sensor Stick? I am not familiar with it.

https://www.sparkfun.com/products/10724

How good is your coding? If multiplexed, the 328 on the IMU would need some reprogramming to set up a protocol to let each one know when to send data out. You might be better off with a Serial Port mux so the Mega would control which IMU it was talking to vs modifying the IMU code. Two quad-AND gates and a quad-OR gates would do that:

It is necessary to avoid sending the data at once, right? I would like to know more about this, but I have not found any significant examples of code for this. By any chance, if you know some references, I would appreciate for your information.

Thank you.

Sensor stick is not set up to have user selectable addresses per part. It has SCL interface for all devices - so that and the I2C mux from DSSCircuits woulw work well.

The original IMU could have an Arduino 3.3V/8MHz Promini bootloader installed and then each one coded via the serial interface to have a unique serial address to interface with the Mega - Tx from Mega goes to all 4 boards, Tx from the boards would need a little mux hardware to combine their signals - and then your software would talk to one board at a time:

1, send me data:

1 response: here's your data

2, send me date:

2 response: here's your data

etc.

CrossRoads: Sensor stick is not set up to have user selectable addresses per part. It has SCL interface for all devices - so that and the I2C mux from DSSCircuits woulw work well.

As long as I checked their web site, it looks like easy to set this up :

http://dsscircuits.com/index.php/i2c-multiplexer

The original IMU could have an Arduino 3.3V/8MHz Promini bootloader installed and then each one coded via the serial interface to have a unique serial address to interface with the Mega - Tx from Mega goes to all 4 boards, Tx from the boards would need a little mux hardware to combine their signals - and then your software would talk to one board at a time:

1, send me data:

1 response: here's your data

2, send me date:

2 response: here's your data

etc.

How about this product for this ?:

https://www.atlas-scientific.com/product_pages/embedded/serial-port-connector.html

Now I have the choices between:

9 Degrees of Freedom - Sensor Stick + 4 Channel I2C Multiplexer

or

9 Degrees of Freedom - Razor IMU + RS-485 Breakout (+ two quad-AND gates and a quad-OR gates )

Does anyone have any ideas about their pros and cons? Any kinds of your experiences or references would be appreciated.