Module/Meas Spec MS5611 I2C
Overview
The Measurement Specialties MS5611 is an excellent barometer/pressure sensor. Currently a plastic case version (-BA01) and a metal case version (-BA03) exist. The sensor can be used as I2C or SPI device. This page describes the connection through I2C (the MS5611 mounted on the Aspirin V2.2 uses the SPI port).
Module name | sensors/baro_ms5611_i2c |
Sensor type | barometer, temperature |
Range (baro) | 10 kPa .. 1200 kPa |
Range (temp) | -40°C .. +85°C |
Resolution (baro) | 1.2 Pa |
Resolution (temp) | 0.01°C |
Refresh rate | 4Hz |
I2C address | 0xEE |
Hardware
The sensor can directly interface to the 3.3V I2C port of the autopilots and is supplied by +3.3V.
Supplier:
Wiring
Autopilot I2C pin | Autopilot I2C | MS5611 |
1 | GND | GND |
2 | ||
3 | +3.3V | VCC |
4 | SDA | SDA |
5 | SCL | SCL |
Usage
To use it load the baro_ms5611_i2c module:
File: conf/airframes/myplane.xml |
<modules>
...
<load name="baro_ms5611_i2c.xml"/>
</modules>
|
Configuration
To see the sensors data in the log file set the SENSOR_SYNC_SEND in your airframe file. Every time new data is available it will be sent directly.
File: conf/airframes/myplane.xml |
<modules>
...
<load name="baro_ms5611_i2c.xml">
<define name="SENSOR_SYNC_SEND"/>
</load>
</modules>
|
Result message
The raw values (d1/d2) and the corrected ones (pressure/temp) are written to the log file.
File: conf/messages.xml |
<message name="BARO_MS5611" id="116">
<field name="d1" type="uint32"/>
<field name="d2" type="uint32"/>
<field name="pressure" type="float" unit="hPa" format="%.2f"/>
<field name="temp" type="float" unit="deg_celsius" format="%.2f"/>
</message>
|
The sensors calibration values are read out at init time and transmitted every 30 seconds. They can be seen as some sort of unique serial number.
File: conf/messages.xml |
<message name="MS5611_COEFF" id="117">
<field name="c0" type="uint16"/>
<field name="c1" type="uint16"/>
<field name="c2" type="uint16"/>
<field name="c3" type="uint16"/>
<field name="c4" type="uint16"/>
<field name="c5" type="uint16"/>
<field name="c6" type="uint16"/>
<field name="c7" type="uint16"/>
</message>
|
Sample log file lines
10.239 123 MS5611_COEFF 8 53136 52817 34048 31158 31184 28953 55558 11.024 123 BARO_MS5611 8049424 8052329 988.8 22.38 11.272 123 BARO_MS5611 8049312 8052284 988.77 22.38 11.524 123 BARO_MS5611 8049344 8052330 988.78 22.39