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: Prof. Dr.-Ing. Heinrich Warmers
Subject: Re: [Paparazzi-devel] BMP085 sensor temperature wiht large error
Date: Fri, 05 Aug 2011 18:34:49 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.4) Gecko/20030619 Netscape/7.1 (ax)

Hi, Martin
Thanks for the fast correction.

Regards
Heinrich


Martin Mueller schrieb:

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.


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel





reply via email to

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