I2C pressure sensor

From BitWizard Wiki
Jump to navigation Jump to search

General info

The I2C pressure sensor is based on the MS5637 from Measurement Specialties. It can be found on address 0xEC (7 bit address: 0x76). More info about 7 bit and 8 bit address can be found on the following page: I2c_addresses

Pinout

As with all bitwizard I2C boards, the board has a 4 pin female connector on the left and a male connector on the right so that you can daisychain multiple boards.

The pinout is GND, SDA, SCL, VCC. (with a bit of luck this is now silk-screened on the back of the board.)

Voltages

The chip is 3.3V, a regulator is provided on board. This regulator has a dropout of about 1V, so the board currently requires a 5V nominal VCC. We'll move to a different regulator one of these days allowing clean 3.3V operation. (the dropout will be so low that the chip will have to make do with 3.299V if you provide 3.300V....). The chip can handle 4k7 pullups to 5V on the I2C bus.

Examples

This is an example arduino sketch that prints the pressure every second.

#include <Wire.h>
#include <BaroSensor.h>

void setup()
{
  Serial.begin(9600);
  BaroSensor.begin();
}

void loop()
{
  float temp, pres;
 
  if(!BaroSensor.isOK()) {
    Serial.print("Sensor not Found/OK. Error: "); 
    Serial.println(BaroSensor.getError());
    BaroSensor.begin(); // Try to reinitialise the sensor if we can
  } else {
    temp = BaroSensor.getTemperature();
    pres = BaroSensor.getPressure();
    Serial.print (millis ()); 
    Serial.print (" ");
//    Serial.print("T: "); 
    Serial.print(temp);
//    Serial.print(" P: ");
    Serial.print (" "); 
    Serial.println(pres);
  }
  delay (1000);
}


Datasheets

[[1]]