I2C pressure sensor

From BitWizard Wiki
Revision as of 15:26, 11 August 2015 by Rew (talk | contribs) (Created page with "= general info = The I2C pressure sensor is based on the MS5637 from Measurement Specialties. = pinout = As with all bitwizard I2C boards, the board has a 4 pin female conn...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

general info

The I2C pressure sensor is based on the MS5637 from Measurement Specialties.

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]]