Module/Freescale MPL3115A2
Revision as of 16:25, 9 March 2013 by Martinmm (talk | contribs) (Created page with "__NOTOC__ thumb|right|Freescale MPL3115A2 barometer == Overview == The Freescale MPL3115A2 is a barometer/pressure sensor. {|border="1" |-valign="top" |…")
Overview
The Freescale MPL3115A2 is a barometer/pressure sensor.
Module name | sensors/baro_mpl3115 |
Sensor type | barometer, temperature |
Range (baro) | 30 kPa .. 1100 kPa |
Range (temp) | -40°C .. +85°C |
Resolution (baro) | 0.25 Pa |
Resolution (temp) | 0.01°C |
Refresh rate | 5Hz |
I2C address | 0xC0 |
Hardware
The sensor directly interfaces to the 3.3V I2C port of the autopilots and is supplied by +3.3V.
Supplier: Sparkfun
Wiring
Autopilot I2C pin | Autopilot I2C | Freescale MPL3115A2 |
1 | GND | GND |
2 | ||
3 | +3.3V | VCC |
4 | SDA | SDA |
5 | SCL | SCL |
Usage
To use it load the baro_mpl3115 module:
File: conf/airframes/myplane.xml |
<modules>
...
<load name="baro_mpl3115.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. For pressure reading instead of altitude set MPL3115_ALT_MODE to zero.
File: conf/airframes/myplane.xml |
<modules>
...
<load name="baro_mpl3115.xml">
<define name="SENSOR_SYNC_SEND"/>
<define name="MPL3115_ALT_MODE" value=0/>
</load>
</modules>
|
Result message
Unfortunately only the raw values are written to the log file (to be changed), they need to be multiplied by the coefficient given in conf/messages.xml.
File: conf/messages.xml |
<message name="MPL3115_BARO" id="68">
<field name="pressure" type="uint32" alt_unit="Pa" alt_unit_coef="0.25"/>
<field name="temp" type="int16" alt_unit="degC" alt_unit_coef="0.0625"/>
<field name="alt" type="float" unit="m"/>
</message>
|
Sample log file lines (pressure mode)
18.840 123 MPL3115_BARO 395099 353 0. 19.041 123 MPL3115_BARO 395143 353 0. 19.243 123 MPL3115_BARO 395142 353 0. 19.440 123 MPL3115_BARO 395130 353 0.