Go Down

Topic: I2C bus shared by 2 prototype shields (Read 1 time) previous topic - next topic

EEfigo

Hi all,


I have been working on a project that requires sampling from multiple sensors on a single Arduino board. Specifically, the Arudino board I am using is the Arduino Ethernet from Adafruit. We have 3 sensors which all use I2C to communicate to the Arduino Ethernet. To hold these 3 sensors, I use 2 prototype boards, with one sensor on one prototype board (denote as Proto-A) and the remaining 2 sensors on the other prototype board (denote as Proto-B). When I connect Proto-A to the Arduino Ethernet without Proto-B, there is no problem at all and I can see the sensor readings from the serial monitor. Same good thing happens when connect Proto-B to the Arduino Ethernet without Proto-A. However, when I put Proto-B on top of Proto-A and plug Proto-A into the Arduino Ethernet, no outputs are shown in the serial monitor. Does anybody know why this happens and how could I solve this problem? Many thanks.

Bests,
Michael


CrossRoads

What are the sensors?
Links to data sheets.
How are pullup resistors wired?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

EEfigo

The 3 sensors are:

1. BMP085 Barometric Pressure Sensor from Sparkfun (http://www.sparkfun.com/tutorials/253).
2. K30 CO2 sensor from CO2 meter (http://co2meters.com/Documentation/Datasheets/DS30-01%20-%20K30.pdf).
3. iAQ-engine VOC sensor from AppliedSensor (http://www.appliedsensor.com/pdfs/APS_iAQEngine_0411.pdf).

Since all these 3 sensors share the same I2C bus, I use 10K ohm as pullup resistors. The connection is drawn below:

GND ---------------o-----------------------------------------
VCC (5V)---------o-|--------------------------------o----o---
                 | |                                |    |
              iaq engine                           | |  | |
                 | |                           10k | |  | | 10k
                 | |                                |    |
SCL -------------o-|--------------------------------o    |
SDA ---------------o-------------------------------------o---


CrossRoads

2nd unit says pullups to 3.3V for I2C.

Not enough info provided to say if there are address conflicts between the 3, or if the 2nd & 3rd just respond to every request.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

EEfigo

Hi CrossRoads,


I am sure that all these 3 sensors have their unique I2C addresses. So no address conflicts for sure. I am not sure if my pull-up resistor is right. How to determine whether the value of pull-up resistor is correct? I use 10K ohm because it is what people normally use. Please guide me if I am wrong... Thanks.

CrossRoads

Use 4.7K.
10K not strong enough. I would also disable Arduino internal pullups and make the pullups to 3.3V so you don't damage the 2nd listed part.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

EEfigo

Thanks for the quick reply!

1. So the smaller the resistor is, the stronger the pullup is?

2. This may be a naive question, but what is the purpose to disable Arduino internal pullups?

Many thanks!

CrossRoads

"disable Arduino internal pullups"
Keeps the 2 lines from getting pulled up to 5V internally, only want 3.3v.
All the devices use open drain or open collector to pull the lines low, and pullup brings the line back high.
The more things connected the slower the lines go from low to high.
Need lower resistor value for snappier pull up to keep data rates high.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up