I2C bus interfacing with three sensors of the same address

My project need to read three compass sensors simultaneously, the sensors are HMC5843, which use I2C communication.
There is only one 7-bit address 0X1E...how can i connect 3 of these sensors together to an Arduino?
HMC5843: http://www.sparkfun.com/products/9441

I have three arduinos. Is it possible to connect each sensor to each arduino by I2C, and then connect the arduino together with another separate I2C bus?

or working with SPI..?

or use this 'I2C multiplexer switch'? :cold_sweat:

thanks!

I have three arduinos. Is it possible to connect each sensor to each arduino by I2C, and then connect the arduino together with another separate I2C bus?

Not easily. Each Arduino only has 1 set of I2C pins.

or working with SPI..?

Yes, of the chip has an SPI interface.

or use this 'I2C multiplexer switch'? :cold_sweat:
PCA9548A data sheet, product information and support | TI.com

The I2C multiplexer ought to work.

you can try to do bitbanging on different arduino outputs.

I used it for only 1 i2c device but it is possible to do this over different ports:

www.pe1br.nl/arduino/i2cpll/iicpll.pde

I'd go for the MUX or 3 buffer chips like the PCA9517.


Rob

johnwasser:

Yes, of the chip has an SPI interface.
really? but i search through the data sheet there not even one word mentioning the SPI...

The I2C multiplexer ought to work.
I'd go for the MUX or 3 buffer chips like the PCA9517
so which one is easier or more standard way to do? Have anyone use those devices before? I cannot search any tutorial about these guy on the web, can anyone tell me more like how to connect the circuit, how to communicate with it.
thanks :expressionless:

fukkuen:
I have three arduinos. Is it possible to connect each sensor to each arduino by I2C, and then connect the arduino together with another separate I2C bus?

or working with SPI..?

Connect a sensor to each Arduino using I2C. Connect the Arduinos together using SPI. (That is, connect together MOSI, MISO, SCK in each case). Make one Arduino the SPI master and the other two slaves. You will need a SS (slave select) line for each slave, eg. D10 and D9 on the master.

Then the master Arduino can read its own sensor through I2C, and then query each slave in turn for their sensor values. Details about making SPI masters and slaves here:

I have the same problem reading just two identica BMP085 pressure sensors. I have never had to deal with this before- i understand they cannot be assigned new addresses, or diffirentiated.

What did you end up using?

The I2c Switch seems simple... any traps?

There is only one 7-bit address 0X1E...how can i connect 3 of these sensors together to an Arduino?

Use an extra pin to power the selected sensor? sort of SS line ? it has only a five millisec "boot time" according to the datasheet.

Trick should also work for BMP085 I think.

robtillaart:
Use an extra pin to power the selected sensor? sort of SS line ? it has only a five millisec "boot time" according to the datasheet.
Trick should also work for BMP085 I think.

Thank you for posting this. It worked very well for me. I am taking pressure readings using the BMP085 and it does not have to be exactly simultaneous (within 1000ms is fine). I gave the BMP085 10ms to boot, read temp/pa from it, and then turned it off. Also had to be sure to initialize and power the pin before doing Wire.begin(), and calibration in setup().

Thank you for posting this. It worked very well for me.

Good to hear it works,

another advantage is that it might reduce power usage quite a bit assuming a read takes 10 ms then total time to read temp & press would be less than 50 ms. As you only need to read once per 1000 ms that implies usage in the order of 5%.

I know this post is kind of old. There is a solution for those who have similar problems , go on ebay and search for "Regal I2C", It's extremely easy to use and it's chain-able to support tons of devices with the same I2C address.