Anyone used the Bosch BMP085 I2C baro sensor yet ?


Closed Thread
Results 1 to 40 of 52

Hybrid View

  1. #1
    Join Date
    Nov 2008
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by rore85 View Post
    Hi... I'm new in this forum and I need your help about how to manage data from BMP085 in assembler... I need test it in a PIC16f84...
    Hi, If you can get a PIC16F84 to read and process the data from a BMP085 into true pressure and temperature I'll eat my shorts !!

    My program has hit 5.5Kb in code size on an 18F PIC. Sure I know assembly is much much tighter, but by that much ?

    I will soon post (I hope so) the complete code to use this sensor on a PIC18FXXXX device with PBP. You can use the ASM file I guess to see how blocks of it are done in assembly.
    Cheers,
    Martin

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Hi, Sneezzy

    I Think , with little trickery, the 16F84 could fit ...

    let's think ...

    IF you calculate the linearisation OUTSIDE the Pic, and trunk it to the PRECISION claimed ( not the resolution, eh ...)
    ...

    I'm sure a lookup table, or a couple of " ax+b " regressions could be used.

    But that implies ... the sensor and the PIC are married for life !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Nov 2008
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi, Sneezzy

    I Think , with little trickery, the 16F84 could fit ...

    let's think ...

    IF you calculate the linearisation OUTSIDE the Pic, and trunk it to the PRECISION claimed ( not the resolution, eh ...)
    ...

    I'm sure a lookup table, or a couple of " ax+b " regressions could be used.

    But that implies ... the sensor and the PIC are married for life !!!

    Alain
    I did think of that early on. I think you need to map all possible pressure readings (at your needed precision) across your range, but then also map for every possible temperature change across all pressure readings in that range. I think it very quickly becomes an impressive size lookup table yes ?
    I suspect my shorts are safe, but if the poster above can do it I'll listen :-)

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Hi, Martin

    I had a look to your excel sheet and , of course, got THE problem ...

    solution was to unlock the sheet , select the "F16" place and click on " place a formula " ( Fx button ) ...

    it automatically corrects the written formula and then it rolls fine !!!

    Are the Calibration values in the sheet those of YOUR Sensor ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Nov 2008
    Posts
    96


    Did you find this post helpful? Yes | No

    Smile

    Quote Originally Posted by Acetronics View Post
    Hi, Martin

    I had a look to your excel sheet and , of course, got THE problem ...

    solution was to unlock the sheet , select the "F16" place and click on " place a formula " ( Fx button ) ...

    it automatically corrects the written formula and then it rolls fine !!!

    Are the Calibration values in the sheet those of YOUR Sensor ???

    Alain
    Hi Alain, I suspect my friend didn't tell me that so I couldn't fiddle with his sheet

    Yes, that indeed is the calibration data out of my BMP085 sensor.

    Good news.
    Tonight I finished debugging the pressure calculations and got a correct result in Pascals. Boy it took some doing didn't it. :-)
    Tomorrow I'll tidy up the code and post the whole job after doing a little field testing.

    Now I need to find a sample of a 'good' way to do a look-up table to convert pressure to altitude without using Logs (as I understand is required)...

    Martin

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Hi, Martin

    Was an awful job to crack the sheet password I had to wait for the second attempt to get it open ...

    May be ...

    an excel sheet could easily produce the retrieve table to include in the program ???

    I already did that for a programmable electronic ignition project ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    May 2010
    Posts
    3


    Did you find this post helpful? Yes | No

    Red face Hi Martin

    Thanks for answer...
    I wonder if the calibration coefficients of BMP085 depend on something ... as either light, or are the same constants for all?
    And another thing, the uncompensated temperature varies a lot ... in the order of thousands or hundreds
    Thanks

  8. #8
    Join Date
    Nov 2008
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Hi, Martin

    Was an awful job to crack the sheet password I had to wait for the second attempt to get it open ...

    May be ...

    an excel sheet could easily produce the retrieve table to include in the program ???

    I already did that for a programmable electronic ignition project ...

    Alain
    Yes, I guess it could be done that way. I wonder how much data in the table is just enough, that might be hard to workout ?
    Yes the sensor would be mated by the table to one PIC for life, and make it impossible to give the HEX file to anyone else to use for an open project (if they can't use PBP). Unless the table can be forced into a known place in code space perhaps... Messy at the very least.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts