Difference between revisions of "I2C pressure sensor"
Line 1: | Line 1: | ||
= general info = |
= general info = |
||
The I2C pressure sensor is based on the MS5637 from Measurement Specialties. It can be found on address 0xEC. |
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 = |
= pinout = |
Revision as of 15:19, 31 August 2015
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]]