Pressure measurement with multiple sensors (Omron D6FPH)

For a project, I measured the pressure in a wind tunnel using an Omron D6FPH5050AD3 and an OMRON D6FPH0025AD1 (data sheet for both sensors) respectively. I am currently using an Arduino ATMEGA as a microcontroller.

Now my task is to perform the measurement with up to 12 sensors of one type, so that I can measure the pressure at different points in the wind tunnel.
Is it at all possible to perform the measurement with multiple sensors of these types and if so, up to what maximum number of sensors are possible to use?

I would like to say that I am relatively new to microcontrollers and pressure measurement.

If it is at all possible I have to adapt the code in the next step so that it works for multiple sensors
The code for the measurements with a single sensor I got here from the forum. (code I used)

#include "Wire.h"
#define addrs 0x6C // I2C bus address
int P;
int I;
float T;

int initialize(int i2c_addr)
{
  //INITIALIZATION AFTER POWER UP
  Wire.beginTransmission(i2c_addr);
  Wire.write(0x0B);  
  Wire.write(0x00); 
  int x = Wire.endTransmission(); 
  return x;
}

int pressure(int i2c_addr)
{
  //MCU MODE
  Wire.beginTransmission(i2c_addr);
  Wire.write(0x00);   
  Wire.write(0xD0);  // reg 0 - address register high byte 
//  Wire.write(0x51);  // reg 1 - address register low byte
  Wire.write(0x40);  // reg 1 - address register low byte
  Wire.write(0x18);  // reg 2  - serial control register - indicate # bytes among others (page 7 bottom)
  Wire.write(0x06);  // reg 3 - value to be written to SENS control register
  int x = Wire.endTransmission(); 

  delay(33);

  //WRITE
  Wire.beginTransmission(i2c_addr);
  Wire.write(0x00);   
  Wire.write(0xD0);
  Wire.write(0x51);
  Wire.write(0x2C);
  x = Wire.endTransmission(); 
  
  //READ
  Wire.beginTransmission(i2c_addr);
  Wire.write(0x07);
  x = Wire.endTransmission(); 

  Wire.requestFrom(i2c_addr, 2);
  byte hibyte = Wire.read();
  byte lobyte = Wire.read();
  long raw = word( hibyte, lobyte);  
  //Serial.print("raw pressure:\t ");
  //Serial.println(raw); 
  
  // D6F-PH5050AD3 ==> rangeMode=500 ==> int rd_pressure =  ((raw - 1024) * rangeMode * 2 / 60000L) - rangeMode
  // D6F-PH0505AD3 ==> rangeMode=50  ==> int rd_pressure =  ((raw - 1024) * rangeMode * 2 / 60000L) - rangeMode
  // D6F-PH0025AD1 ==> rangeMode=250 ==> int rd_pressure=(raw - 1024) * rangeMode / 60000L
  int rangeMode = 50;
  int rd_pressure =  ((raw - 1024) * rangeMode * 2 / 60000L) - rangeMode;
  return rd_pressure;
}

float temperature(int i2c_addr)
{
  //MCU MODE
  Wire.beginTransmission(i2c_addr);
  Wire.write(0x00);   
  Wire.write(0xD0);  // reg 0 - address register high byte 
  // Wire.write(0x51);  // reg 1 - address register low byte
  Wire.write(0x40);  // reg 1 - address register low byte  
  Wire.write(0x18);  // reg 2  - serial control register - indicate # bytes among others (page 7 bottom)
  Wire.write(0x06);  // reg 3 - value to be written to SENS control register
  int x = Wire.endTransmission(); 

  delay(33);
  
  //WRITE
  Wire.beginTransmission(i2c_addr);
  Wire.write(0x00);   
  Wire.write(0xD0);
  Wire.write(0x61);
  Wire.write(0x2C);
  x = Wire.endTransmission(); 
  
  //READ
  Wire.beginTransmission(i2c_addr);
  Wire.write(0x07);
  x = Wire.endTransmission(); 

  Wire.requestFrom(i2c_addr, 2);  
  byte hibyte = Wire.read();
  byte lobyte = Wire.read();
  long raw = word( hibyte, lobyte);  
  //Serial.print("raw temperature:\t ");
  //Serial.println(raw); 
  int temp = round((float)(raw - 10214) / 3.739);  // this is the temperature multiplied by 10...
  return (temp/10.0);                      // ...and the function returs the float temperature with 0.1°C resolution
}

void setup()
{  // Open serial communications 
 Wire.begin();
  Serial.begin(9600);
 I=initialize (addrs); // start wire connection

}

void loop()
{
    P=pressure(addrs);
    Serial.print("pressure:\t ");
    Serial.println(P);
    T=temperature(addrs);
    Serial.print("temperature:\t ");
    Serial.println(T);
    delay(30000); //delay for 30 seconds

}

From the datasheet it appears that each sensor of a type has a fixed I2C address, which I assume means that you will not be able to read from each of them individually. Other forum members may know of techniques to achieve this by powering each sensor selectively then reading from it, for instance, but that sounds very clumsy

I assume that you cannot dedicate a separate Arduino to each sensor. If you could then reading 12 sensors with the same address would be possible

Hi @trickster123,
your sensor uses the I2C protocol, and its address cannot be changed and therefore cannot use more than one on the atmega I2C bus..
But with TCA9548A device you can use up to 8 sensors with the same address.
You can connect up to 8 TCA9548A on the same mega I2C bus and thus have up to 64 sensors with the same address.

RV mineirin

Hi @ruilviana,

for now this has helped me a lot. I just ordered this Multiplexer and a second Sensor just to test, if it will work.

The problem I have is that I need to "simultaneously" measure the pressures with the different sensors. This means that I have to program in such a way that the sensors can measure directly one after the other, i.e. the multiplexer releases the individual channels one after the other.

Since the sensors are all the same and therefore run under the same code, the code for the individual sensors then remains the same and I must program that the individual channels are released one after the other by the multiplexer? Or does that not work like that?

Something to think about is each sensor has it’s own error .
If you are looking for small differences in pressure , this can swamp any hope of accuracy .
You could look at using one sensor and switching it with small solenoids .
Look at the transducers errors in the data sheet