<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: MPL3115A2 Altitude question in Sensors</title>
    <link>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326580#M833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;It looks like you are calculating the altitude in the barometer mode. In order to calculate the correct altitude from registers 0x01 – 0x03, the device needs to be in the altimeter mode (ALT bit of the CTRL_REG1 register has to be set). I am not familiar with Arduino libraries in detail, but I guess that there is a function called “setModeAltimeter()” that puts the sensor into altimeter mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: italic; font-size: 11px; font-family: inherit; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;PS:&lt;SPAN class="Apple-converted-space" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN class="Apple-converted-space"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: italic; font-size: 11px; font-family: inherit; color: #3d3d3d;"&gt;If my answer helps to solve your question, please mark it as "Correct" or “Helpful”. Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jul 2014 12:06:45 GMT</pubDate>
    <dc:creator>TomasVaverka</dc:creator>
    <dc:date>2014-07-31T12:06:45Z</dc:date>
    <item>
      <title>MPL3115A2 Altitude question</title>
      <link>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326579#M832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have verified that both the Temperature and Pressure are correct.&amp;nbsp; However I can't get the Altitude reading to get even close to the correct altitude.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I live in Miami, FL (South Florida).&amp;nbsp; I'm practically at sea level, 22 miles (33.5 km) from the beach.&amp;nbsp; Elevation reading from a local weather station is 2 meters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Pressure today is 1010.38 hPa, again from the local weather station.&amp;nbsp; The reading on the MPL3115A2 is 101488 PA, which is close enough.&amp;nbsp; hPa on Miami Beach tonight is 1011.74.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outside temperature tonight is 27.3 C.&amp;nbsp; I am testing the MPL3115A2 inside my one story house where the temperature is around 23 C.&amp;nbsp; Temperature reading is correct on the MPL3115A2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The altitude being displayed is ...&amp;nbsp; 25394.xx meters!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read through a document I found on the freescale site and I did see something about adjusting a register to local conditions or something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notes:&amp;nbsp; Arduino Uno/Adafruit MPL3115A2/Libraries being used to test are the ones from Adafruit and Sparkfun/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what is going on here?&amp;nbsp; Why is the Altitude way off while the other two variables are correct.&amp;nbsp; The Altitude is calculated correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate anyone's help with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris - Miami, FL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2026 21:46:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326579#M832</guid>
      <dc:creator>cmhippy</dc:creator>
      <dc:date>2026-02-03T21:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: MPL3115A2 Altitude question</title>
      <link>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326580#M833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Arial, sans-serif;"&gt;It looks like you are calculating the altitude in the barometer mode. In order to calculate the correct altitude from registers 0x01 – 0x03, the device needs to be in the altimeter mode (ALT bit of the CTRL_REG1 register has to be set). I am not familiar with Arduino libraries in detail, but I guess that there is a function called “setModeAltimeter()” that puts the sensor into altimeter mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: italic; font-size: 11px; font-family: inherit; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;PS:&lt;SPAN class="Apple-converted-space" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN class="Apple-converted-space"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: italic; font-size: 11px; font-family: inherit; color: #3d3d3d;"&gt;If my answer helps to solve your question, please mark it as "Correct" or “Helpful”. Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 12:06:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326580#M833</guid>
      <dc:creator>TomasVaverka</dc:creator>
      <dc:date>2014-07-31T12:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: MPL3115A2 Altitude question</title>
      <link>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326581#M834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!&amp;nbsp; I did see that function somewhere in the Arduino library for the MPL3115A2.&amp;nbsp; I'll check this out tonight as soon as I get back home.&amp;nbsp; I'll let you know how it goes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again, thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jul 2014 14:56:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326581#M834</guid>
      <dc:creator>cmhippy</dc:creator>
      <dc:date>2014-07-31T14:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: MPL3115A2 Altitude question</title>
      <link>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326582#M835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tomas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much better!&amp;nbsp; Still not correct but at least not thousands of meters.&amp;nbsp; It's -27 meters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should be 2 meters (or close to 2 meters).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So back to the drawing board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if I should check anything else or you need any further information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 02:05:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326582#M835</guid>
      <dc:creator>cmhippy</dc:creator>
      <dc:date>2014-08-01T02:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: MPL3115A2 Altitude question</title>
      <link>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326583#M836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;Glad to hear this, Chris.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;Now you can adjust the altitude using the built-in OFF_H (0x2D) register that offers user-set altitude offset adjustments in twos complement format with a scale factor of 1 m/LSB. In your case the difference is about 29 meters, so you need to write this value into the OFF_H register. Then this offset value is automatically added to the altitude data and the adjusted resulting value is stored in the output data registers 0x01 – 0x03.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;Let me know if you have any other questions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Arial','sans-serif';"&gt;Tomas&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Aug 2014 09:09:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326583#M836</guid>
      <dc:creator>TomasVaverka</dc:creator>
      <dc:date>2014-08-01T09:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: MPL3115A2 Altitude question</title>
      <link>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326584#M837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am very new to this. I would like to get the connection details of arduino and mpl3112 freescale xtrinsic sensor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have observed is jumper J1 has 6 pins on its base board and 8 pins on its top pressure sensor board. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am unable to get the connection details. Can you please guide me with the same? I would also be really helpful if you can guide me with proper pdf for connectrion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having following sensor.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=DEMOSTBMPL3115A2" title="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=DEMOSTBMPL3115A2"&gt;Sensor Toolbox MPL3115A2 Development Kit|Freescale&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 10:58:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326584#M837</guid>
      <dc:creator>miteshsirodaria</dc:creator>
      <dc:date>2015-08-20T10:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: MPL3115A2 Altitude question</title>
      <link>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326585#M838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mitesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached you can find the schematic of the board you are using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are five pins that need to be hooked up in order to start using this sensor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MPL3115A2 sensor board -&amp;gt; Arduino&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VDD (J3-3) -&amp;gt; 3.3V&lt;/P&gt;&lt;P&gt;VDDIO (J2-1) -&amp;gt; 3.3V&lt;/P&gt;&lt;P&gt;GND (J2-5) -&amp;gt; GND&lt;/P&gt;&lt;P&gt;SCL (J2-4) -&amp;gt; A5 (or SCL)&lt;/P&gt;&lt;P&gt;SDA (J2-6) -&amp;gt; A4 (or SDA)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using a 5V Arduino Uno, we recommend putting 330 ohm resistors in line to limit the 5V signal going into the MPL3115A2 and prevent damage to the sensor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2015 08:47:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326585#M838</guid>
      <dc:creator>TomasVaverka</dc:creator>
      <dc:date>2015-08-21T08:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: MPL3115A2 Altitude question</title>
      <link>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326586#M839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tomas,&lt;/P&gt;&lt;P&gt;I too have a similar problem when I try to read data from the mpl3115a2. I get values in the range of &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;25394.xx-35111.xx meters even I I try to configure the mpl to altitude mode like you suggested. It seems like non of the configuration process is being picked up by the sensor. I am able to read from the sensor but I cant get it to output appropriate altitude values. When I display values on terminal, I see the values fluctuation at a very fast rate. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I am using Tiva C MCU with code composer studio compiler, and all the codes are written using registers (my own libraries). I have test my code on other sensors (MPU 6050) and I am able to configure the devices properly and read but I just cant seem to have this device configured properly. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14597228085546057 jive_text_macro" data-renderedposition="216_8_1192_320" jivemacro_uid="_14597228085546057"&gt;&lt;P&gt;void configure_PressureSensor(void)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; //system mode register&lt;/P&gt;&lt;P&gt;&amp;nbsp; write_pressureSensor(0x11, 0x00);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Active barometer mode, OSR = 128&lt;/P&gt;&lt;P&gt;&amp;nbsp; //write_pressureSensor(0x26, 0x39);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //* Set to Altimeter with an OSR = 128 */ and Active altimeter mode&lt;/P&gt;&lt;P&gt;&amp;nbsp; write_pressureSensor(0x26, 0xB8);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //* Enable Data Flags in PT_DATA_CFG */&lt;/P&gt;&lt;P&gt;&amp;nbsp; write_pressureSensor(0x13, 0x07);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // activate&lt;/P&gt;&lt;P&gt;&amp;nbsp; write_pressureSensor(0x26, 0xB9);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //system mode register&lt;/P&gt;&lt;P&gt;&amp;nbsp; write_pressureSensor(0x11, 0x01);&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Apr 2016 22:40:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326586#M839</guid>
      <dc:creator>saeed</dc:creator>
      <dc:date>2016-04-03T22:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: MPL3115A2 Altitude question</title>
      <link>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326587#M840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saeed,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is hard to say where the problem might be. At first, I would recommend you taking a closer look at my &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-101371"&gt;example code&lt;/A&gt; for the MPL3115A2 that illustrates how to configure it and compute altitude as well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your configuration, the SYSMOD register (0x11) only indicates the current operating mode (either standby or active), you should not write to it. The SBYB bit in the CTRL_REG1 register (0x26) is used to select the operating mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Apr 2016 08:17:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Sensors/MPL3115A2-Altitude-question/m-p/326587#M840</guid>
      <dc:creator>TomasVaverka</dc:creator>
      <dc:date>2016-04-04T08:17:47Z</dc:date>
    </item>
  </channel>
</rss>

