paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] BMP085 sensor temperature wiht large error


From: Martin Mueller
Subject: Re: [Paparazzi-devel] BMP085 sensor temperature wiht large error
Date: Fri, 05 Aug 2011 17:57:53 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11

Hi Helge,

the extra noise is from reading the lower three bits of the pressure result wrongly. They are in the higher bits of the XLSB, not the lower, fixed in master:

@@ -130,7 +130,7 @@ void baro_bmp_event( void ) {
       /* get uncompensated pressure, oss=3 */
       bmp_up = (bmp_trans.buf[0] << 11) |
                (bmp_trans.buf[1] << 3)  |
-                bmp_trans.buf[2];
+               (bmp_trans.buf[2] >> 5);
       /* start temp measurement */
       bmp_trans.buf[0] = BMP085_CTRL_REG;
       bmp_trans.buf[1] = BMP085_START_TEMP;

Thanks for looking into that.

As the max conversion time is 25.5ms it could be run at 30Hz without changes, maybe having the temp reading only once per second as suggested in the spec. Some averaging could be done depending on the frequency you need.

Martin

http://paparazzi.enac.fr/wiki_images/Bmp085_scp1000.png
http://paparazzi.enac.fr/wiki_images/Bmp085_scp1000_fixed.png


On 04.08.2011 11:36, Helge Walle wrote:
Hi,
To make sure that the sample rate is not set so high that it interferes
with the conversion time of the BMP sensor, I would need to check the
data flow with my logic analyzer.
I did not do that yesterday evening. However, Increasing freq from "8"
to "20" in .../paparazzi/conf/modules/baro_bmp.xml increased the data
flow and did not create any problems.
The code I used with my Arduino board that made better results was from
Sparkfun. I am quite determined to work through the code since I feel
sure that this is the right way to go.

Regards,
Helge.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]