Question for "MICROPRESSURE BOARD MOUNT PRESSURE SENSORS"

I have a question for “MICROPRESSURE BOARD MOUNT PRESSURE SENSORS”.

I Find FIGURE 7. from datasheet ( https://cdn.sparkfun.com/assets/2/e/8/0 … asheet.pdf)

Each MPR Series I2C sensor is referenced on the bus by a 7-bit slave address.

The default address for the MPR Series is 24 (0x18).

Other available standard addresses are: 08 (0x08), 40 (0x28), 56 (0x38), 72 (0x48), 88 (0x58), 104 (0x68), 120 (0x78).

(see P.14 from https://cdn.sparkfun.com/assets/2/e/8/0 … asheet.pdf)

I try to use two sensors on I2C Bus. But It’s Only receive data from 24(0x18).

How do I get the I2c Address from the second sensor ?

#include <Wire.h> //include Wire.h library

void setup()

{

Wire.begin(); // Wire communication begin

Serial.begin(9600); // The baudrate of Serial monitor is set in 9600

while (!Serial); // Waiting for Serial Monitor

Serial.println(“\nI2C Scanner”);

}

void loop()

{

byte error, address; //variable for error and I2C address

int nDevices;

int sp=1000;

int n[8] = {8,18,28,38,48,58,68,78};

Serial.println(“Scanning…0x08”);

//Wire.beginTransmission((uint8_t)0x08);

Wire.beginTransmission(8);

error = Wire.endTransmission();

Serial.print(“error=”);

Serial.println(error);

delay(sp); // wait 5 seconds for the next I2C scan

Serial.println(“Scanning…0x18”);

// Wire.beginTransmission((uint8_t)0x18);

Wire.beginTransmission(24);

error = Wire.endTransmission();

Serial.print(“error=”);

Serial.println(error);

delay(sp); // wait 5 seconds for the next I2C scan

Serial.println(“Scanning…0x28”);

//Wire.beginTransmission((uint8_t)0x28);

Wire.beginTransmission(40);

error = Wire.endTransmission();

Serial.print(“error=”);

Serial.println(error);

delay(sp); // wait 5 seconds for the next I2C scan

Serial.println(“Scanning…0x38”);

//Wire.beginTransmission((uint8_t)0x38);

Wire.beginTransmission(56);

error = Wire.endTransmission();

Serial.print(“error=”);

Serial.println(error);

delay(sp); // wait 5 seconds for the next I2C scan

Serial.println(“Scanning…0x48”);

//Wire.beginTransmission((uint8_t)0x48);

Wire.beginTransmission(72);

error = Wire.endTransmission();

Serial.print(“error=”);

Serial.println(error);

delay(sp); // wait 5 seconds for the next I2C scan

Serial.println(“Scanning…0x58”);

//Wire.beginTransmission((uint8_t)0x58);

Wire.beginTransmission(88);

error = Wire.endTransmission();

Serial.print(“error=”);

Serial.println(error);

delay(sp); // wait 5 seconds for the next I2C scan

Serial.println(“Scanning…0x68”);

//Wire.beginTransmission((uint8_t)0x68);

Wire.beginTransmission(104);

error = Wire.endTransmission();

Serial.print(“error=”);

Serial.println(error);

delay(sp); // wait 5 seconds for the next I2C scan

Serial.println(“Scanning…0x78”);

// Wire.beginTransmission((uint8_t)0x78);

Wire.beginTransmission(120);

error = Wire.endTransmission();

Serial.print(“error=”);

Serial.println(error);

delay(5000); // wait 5 seconds for the next I2C scan

}

It looks like the address on those sensors are fixed at manufacture time, but they sell multiple models with different addresses. (See page 7 of that datasheet you referenced in your 1st post.) If both of yours have the same address you can’t use both on the same I2C bus. Assuming you are using the Sparkfun Breakout of this pressure sensor, their hookup guide implies that they may come with different addresses, but that 0x18 (which you have) is the most common. You might want to check with Sparkfun support.

Assuming yours have the same address and they can’t be changed, and you either can’t get or don’t want to get another with a different address, they may be another solution: put each sensor on different I2C busses. You didn’t say what microcontroler you were using, but chances are it does not have multiple hardware I2C busses. However, there are two solutions that I am aware of. Get an I2C multiplexer, or use one of the Software I2C libraries that are available (examples include SoftWire and SoftI2CMaster)

BTW, did you try accessing each sensor when only one was connected? That’ll verify that both are functional and also verify that they do indeed have the same I2C address.

Thanks for your kind reply. I had tried accessing each sensor when only one was connected, and it’s success.

The microcontroler is SparkFun Qwiic MicroPressure(SEN-16476.https://www.sparkfun.com/products/16476).

In page.14(https://cdn.sparkfun.com/assets/2/e/8/0 … asheet.pdf),

I find that “Other custom values are available. Please contact Honeywell Customer Service with questions regarding custom Slave addresses.”

How do I get the regarding custom Slave addresses ?

I find that “Other custom values are available. Please contact Honeywell Customer Service with questions regarding custom Slave addresses.”

How do I get the regarding custom Slave addresses ?

You would need to contact Honeywell Customer Service and order parts with custom slave addresses. Then you’d need to remove the sensors from your current boards and replace them with your custom ones. That’s probably more cost and trouble than it’s worth to you though.

An easier solution would be to use something like a [quiic mux to split your I2C bus into 8 separate busses and put one sensor on each channel.](SparkFun Qwiic Mux Breakout - 8 Channel (TCA9548A) - BOB-16784 - SparkFun Electronics)