Pressure readings ms4525do001D

Hello!

As part of an internship project I have to install a pitot tube inside of a wind tunnel so the airspeed can be measured. This pitot-static tube is connected to an ms4525do001D differential pressure sensor which is connected to an Arduino uno using an I2C connection (I'm using the Arduino uno's internal pull up resistors). However when I run my program when the pitot tube is static on my desk (pressure from static ports and the tube should be the same) it reads a differential pressure of about 60pa (sometimes higher, sometimes lower). Is this a problem with the sensor, code or connection.


#include <Wire.h>
#include "ms4525do.h"


bfs::Ms4525do pres;

void setup() {
  
  Serial.begin(9600);
  while(!Serial){}
  Wire.begin();
  Wire.setClock(400000);

  pinMode(A4, INPUT);
  digitalWrite(A4, HIGH);

  pinMode(A5, INPUT);
  digitalWrite(A5, HIGH);
  
  pres.Config(&Wire, 0x28, 1.0f, -1.0f);
  
  if (!pres.Begin()) {
    Serial.println("Error communicating with sensor");
    while(1){}
  }
}

void loop() {
  
  if (pres.Read()) {
   
    Serial.print(pres.pres_pa(), 2);
    Serial.print("\t");
    //Serial.print(pres.die_temp_c(), 2);
    Serial.print("\n");
  }
  delay(1000);
}

Please post a link to the sensor data sheet.

https://www.te.com/commerce/DocumentDelivery/DDEController?Action=showdoc&DocId=Data+SheetMS4525DOB2pdfEnglishENG_DS_MS4525DO_B2.pdfCAT-BLPS0002

How long are the I2C wires connecting to the sensor? If over about 40 cm that could also cause problems. The I2C is intended for chip to chip not chip to external sensor. The internal pull up resistors are very marginal and normally do not work very well. Use something in the 4.7K range pulling SDA and SCL to +5 with seperate resistors. Then run the I2C scanner and let us know what happens.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.