Shop OBEX P1 Docs P2 Docs Learn Events
Altimeter, temperature changing the altitude — Parallax Forums

Altimeter, temperature changing the altitude

PodionPodion Posts: 90
edited 2014-02-14 18:04 in Accessories
Hi all

I just got my new altimeter module MS5607. I use the altimeter demo ( 29124-Altimeter-Propeller-Demo-Code.zip ) and I wondering if it's normal that the temperature as an effect and change the altitude value ?
Wen I take the altimeter module outside ( it's winter now) the altitude decrease as the temp is falling down...
Do you haw to fix that ?

Thank you

Comments

  • SRLMSRLM Posts: 5,045
    edited 2014-02-08 05:11
    Pressure depends on temperature. If you look on page 7 of the datasheet you'll see that it uses the temperature to calculate the pressure.

    I don't really know of a good way to get around what you're seeing. The common solution is to "zero out" the altitude at the beginning of a run and every chance you can get. This page has a nice discussion on error sources.
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2014-02-08 18:21
    I'm wondering how much change in altitude or barometric pressure you are seeing as a result of that indoor/outdoor temperature difference? A 1 millibar pressure error would amount to about 25 feet of altitude error. This may be unrelated, but i don't think the spin code applies the second order correction that the datasheet suggests for colder temperatures.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-02-08 19:32
    This may be unrelated, but i don't think the spin code applies the second order correction that the datasheet suggests for colder temperatures.
    That is correct; it does not.

    -Phil
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2014-02-09 11:30
    @ Phil, I have to needle you a bit about that-- I managed to put the low temperature correction into the Stamp version using all integer math! :cool: But I didn't do the the third correction below -15 nor the one above +45 °C. It doesn't affect you and me too much where we live, on the coasts. But Brrrrrr, the polar vortex elsewhere! The stratosphere.

    The correction starts for temperatures below 20 °C, which isn't that low. In a sensitivity analysis the error came out to about 2 millibar at 0°C and about 10 mb at -20°C. In the sensitivity analysis I was looking at fixed values of the raw pressure datum, the effect of either applying the second order correction or not. The error might be different in comparison with real pressures.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-02-09 15:30
    I have to needle you a bit about that-- I managed to put the low temperature correction into the Stamp version using all integer math!
    I know you did, and I've felt somehwat abashed by it ever since -- although I don't know (or recall) how you were able to test it. At least that was my excuse at the time: I could test the pressure part by taking the altimeter up a mountain, but the P vs. T sensitivity was another matter.

    In any event, I should take a look at your Stamp code, since going from PBASIC to Spin should be pretty easy.

    -Phil
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2014-02-09 21:20
    You've got me there. I assumed that the algorithm presented in the data sheet is correct. That breaks the cardinal rule: Statements in data sheets are suspect, therefore, always field test it for yourself.

    However, going on the assumption, the suggested second order correction to temperature is simple enough...
    For temperature, it depends on the square of the raw value dT.
    TEMP := TEMP -dT2 / 231
    Then the pressure offset and sensitivity corrections are proportional to the square of the temperature below 20°, expressed in 1/100ths °C.
    OFF := OFF - 61*(TEMP-2000)2 / 16
    SENS := SENS - 2*(TEMP-2000)2
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-02-09 21:43
    I assumed that the algorithm presented in the data sheet is correct.
    I was rather more concerned about testing my implementation of the algorithm, than about the algorithm itself. :)

    -Phil
  • LevLev Posts: 182
    edited 2014-02-10 07:58
    If you like, I can test it for you in our next high-altitude balloon launch. We could compare pressure altitude from the 5607 with the GPS altitude. We'll be logging all data to an SD card at frequent intervals. Next launch is in May.
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2014-02-10 09:48
    @Phil, I know what you are saying and I had to struggle with it. I do fear the fatal flaw--I could have gotten it all wrong. We have to try, no? My recourse has been an Excel spreadsheet that implements the same algorithm, at least I hope it does. I'm looking at it now, and maybe I'll post it. It is exploratory but not self-explanatory, lots of side calculations. The algorithm itself is not the problem. The problem is implementation of the quad precision intermediate results. The data sheet provides example inputs and outputs for the linear case, but not for the low temperature correction.

    By the way, I've made a lot of use of your spin driver as a background process. Wonderfully stable. As absolute pressure sensor it is sitting by freeways around here next to toxic gas sensors for pressure compensation.

    @Lev, that would be nice to see that comparison. What altitudes and temperatures do you expect? It would useful to record the two raw data values returned by the sensor in addition to the calculated temperature and pressure.
  • LevLev Posts: 182
    edited 2014-02-10 14:57
    @Phil, I know what you are saying and I had to struggle with it. I do fear the fatal flaw--I could have gotten it all wrong. We have to try, no? My recourse has been an Excel spreadsheet that implements the same algorithm, at least I hope it does. I'm looking at it now, and maybe I'll post it. It is exploratory but not self-explanatory, lots of side calculations. The algorithm itself is not the problem. The problem is implementation of the quad precision intermediate results. The data sheet provides example inputs and outputs for the linear case, but not for the low temperature correction.

    By the way, I've made a lot of use of your spin driver as a background process. Wonderfully stable. As absolute pressure sensor it is sitting by freeways around here next to toxic gas sensors for pressure compensation.

    @Lev, that would be nice to see that comparison. What altitudes and temperatures do you expect? It would useful to record the two raw data values returned by the sensor in addition to the calculated temperature and pressure.

    Tracy,
    I expect 105k feet, -60C, give or take. The hardware is ready to go, we just need to load the 5607 driver that you want to test. We also have some old data from a 5607 and the PMB648 GPS. I'll look it up.
    The GPS drops out at about 70k feet.
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2014-02-11 08:31
    Lev, I recalled your earlier thread on this topic, the altimeter on the high altitude balloon 2012.
    How was temperature measured on that flight?
    What is it do you think that made the GPS drop out?
  • PodionPodion Posts: 90
    edited 2014-02-14 14:00
    Hello
    I did some test and there are the result
    Wen i use the 29124_altimeter_demo and I use the "F" option to set my altitude at f28500 I have this on the PST
    PST.jpg


    And wen I use this Wireless_Altimeter_Remote_test - Archive [Date 2014.02.14 Time 16.54].zip I get this on the PST
    PST2.jpg

    This one is much closer of the reality.

    P.S. sorry for my english, im from Qu
  • LevLev Posts: 182
    edited 2014-02-14 14:29
    @Tracy,
    The GPS (PMB-648) consistently dropped out at about 60k -70k ft on several flights, I believe due to the CoCom limit.

    http://en.wikipedia.org/wiki/CoCom

    We are now using a unit that has worked well for us up to 90,000 ft, where the balloon burst. It is rated to 84km (about 275k ft) . However, the temp and altitude data pairs we already have was limited by the GPS altitude. The upcoming May flight will use the upgraded GPS receiver.
  • PodionPodion Posts: 90
    edited 2014-02-14 16:12
    I put the altimeter outside and after 2h there is the result
    PST3.png
    the temperature is not stable it slowly drop ~1C / 8 minutes. Even after 2:30h outside at -7C it continuously drop, but very slowly.
    The pressure is good, I have 990.00 from the weather station..after 3h the pressure is 990.02 and the temperature is -1.52C. For now the pressure is good but im afraid that if the temperature is not stable the pressure will raise and will be offset like other measurement.
    251 x 117 - 8K
  • LevLev Posts: 182
    edited 2014-02-14 18:04
    Votre anglais est tres bon! My wife and I love Quebec. We visit there every summer to ride our bikes. It is beautiful and les Quebecois are very kind and helpful.
    This week I will experiment with the altimeter, as you are doing, and see if I get similar results. I would also like to better understand the temperature effect so it can be corrected if necessary.
Sign In or Register to comment.