BMP180 - Anybody working on code for it?

Post Reply
bob4432
Posts: 51
Joined: Sat Jan 29, 2011 2:51 am
Location: USA

BMP180 - Anybody working on code for it?

Post by bob4432 »

Just curious if anybody is working on code for the Bosch BMP180 barometer that is replacing the BMP085? I would be interested in testing software as I have the hardware built, I am just not as efficient as I need to be on the software side.

Image

B Miller/bob4432

mr.rc-cam
Posts: 457
Joined: Wed Jul 27, 2011 11:36 pm

Re: BMP180 - Anybody working on code for it?

Post by mr.rc-cam »

I can't imagine new code is required (it is suppose to be function compatible with the BMP085). So my recommendation is to [1] install it [2] select the BMP085 in the sketch [3] enjoy.

From the data sheet the performance looks similar to the BMP085. So don't expect any miracles from it.

bob4432
Posts: 51
Joined: Sat Jan 29, 2011 2:51 am
Location: USA

Re: BMP180 - Anybody working on code for it?

Post by bob4432 »

I have installed it and defined BMP085 - there is a line for it in the gui and a number shows up in the first error window that changes quite fast, ALT is showing a number that is close to the numbers in the first error window, just not updating as fast (assuming an averaging?), no I2C errors, but the BMP180 has additional features that the BMP085 does not have and I was hoping somebody could implement them that is familiar w/ the hardware.

mr.rc-cam
Posts: 457
Joined: Wed Jul 27, 2011 11:36 pm

Re: BMP180 - Anybody working on code for it?

Post by mr.rc-cam »

Your operational description sounds reasonable.

the BMP180 has additional features that the BMP085 does not have and I was hoping somebody could implement them that is familiar w/ the hardware.

I must have missed it, but the BMP180 data sheet I downloaded from DigiKey does not show any new features. What are they?

bob4432
Posts: 51
Joined: Sat Jan 29, 2011 2:51 am
Location: USA

Re: BMP180 - Anybody working on code for it?

Post by bob4432 »

the BMP180 offers software oversampling that I do not believe was available on the BMP085. Also the timing in getting the data looks to be a bit different than the BMP085, especially when the software oversampling is set. It is kind of just slid in on page 13 of the BMP180 DS - http://www.bosch-sensortec.com/content/ ... 000-07.pdf

mr.rc-cam
Posts: 457
Joined: Wed Jul 27, 2011 11:36 pm

Re: BMP180 - Anybody working on code for it?

Post by mr.rc-cam »

Software over-sampling trickery can be used on a BMP085 too, so that is not a new feature. I think the reason it looks new is because the BMP180 factory demo software now includes an example of it in their the API.

I quickly looked at the data sheet again, searched around, and found that other than the smaller package size and some minor supply noise improvements, the two devices will perform the same. Any other implied improvements are just better "marketing." :) So you are good to go simply by using the BMP085 definitions.

bob4432
Posts: 51
Joined: Sat Jan 29, 2011 2:51 am
Location: USA

Re: BMP180 - Anybody working on code for it?

Post by bob4432 »

Is the reason it is showing up in the error 1 window because of a chip id call?

mr.rc-cam
Posts: 457
Joined: Wed Jul 27, 2011 11:36 pm

Re: BMP180 - Anybody working on code for it?

Post by mr.rc-cam »

The value shown in the debug1 window is the raw altitude (without velocity estimation). It may appear to have more noise (data variation) which is normal. The ALT value is influenced by the ACC-Z data so the debug1 window is used to show the native value for comparison (debugging/troubleshooting use).

bob4432
Posts: 51
Joined: Sat Jan 29, 2011 2:51 am
Location: USA

Re: BMP180 - Anybody working on code for it?

Post by bob4432 »

would it be hard to turn on the software oversampling and then collect data at the rate that would come from that additional overhead? How is it verified that the data collection is correct? is that register just empty if the data is not ready and then in another x amount of ms it polls the register again?

also, is the ALT showing altitude on meters above sea level and then whatever pressure the weather changes it?

mr.rc-cam
Posts: 457
Joined: Wed Jul 27, 2011 11:36 pm

Re: BMP180 - Anybody working on code for it?

Post by mr.rc-cam »

would it be hard to turn on the software oversampling and then collect data at the rate that would come from that additional overhead?

The BMP085 / BMP180 have hardware oversampling. The MWC's BMP085 code uses an 8X hardware oversample (highest supported by the BMP devices). Software oversampling is not implemented but it is a trick that can be used to increase the effective resolution (at the expense of system resources and data update rates).

From my experience the BMP085 resolution is not a serious alt-hold issue on the MWC (we currently have ~10cm resolution). Furthermore, there is a lot of data noise but it does not seem to be the reason for the low alt-hold performance. Instead, the ALT and VEL PID's, including the ACC Z-axis derived velocity estimator, seem to be higher on the list of things to work on. Once those are things are improved we will be able to determine if more resolution will matter.

How is it verified that the data collection is correct?

There are no attempts to qualify/verify the data.

is that register just empty if the data is not ready and then in another x amount of ms it polls the register again?

There is no data-ready polling or other tricks. The code simply knows how long it takes for the various temperature & pressure readings to be ready (based on the data sheet recommendations) and waits for those things to get done using the system timer.

also, is the ALT showing altitude on meters above sea level and then whatever pressure the weather changes it?

It is not practical to determine absolute ASL altitudes; Air pressure varies with mother earth's mood. There's no reason to care either since the MWC's alt-hold feature takes a reference when it is enabled and then makes all altitude error corrections against the reference. If we cared it would be easy to create a AGL (above ground level) altitude by taking a reference when the model is first powered up.


- Thomas

Edit: Seems I can't convert 0.1m to 10cm correctly. Fixed. :)
Last edited by mr.rc-cam on Fri Dec 09, 2011 9:29 pm, edited 1 time in total.

bob4432
Posts: 51
Joined: Sat Jan 29, 2011 2:51 am
Location: USA

Re: BMP180 - Anybody working on code for it?

Post by bob4432 »

Thomas,

I appreciate the responses and education. The reason I was wondering about the ALT was more to see if my bobs were accurate to my real altitude.

Sounds like you said earlier, just use it as the BMP085 :). I have a 9DOM I am going to be building over the weekend and will put it on a quad and start setting the quad up and see how it goes :). It will be mounted upside down w/ some type of filter over the hole and see what happens.

Anything to look for on the bench that would throw up a flag?

mr.rc-cam
Posts: 457
Joined: Wed Jul 27, 2011 11:36 pm

Re: BMP180 - Anybody working on code for it?

Post by mr.rc-cam »

Anything to look for on the bench that would throw up a flag?

The baro feature needs a good working ACC sensor that is not affected by vibration (one that accepts the TRUSTED_ACCZ). Here is a common test: While clutching the quad in your hand in safe way, apply throttle. {Do NOT do this test with the model laying on a surface, it must be isolated from such things.} As throttle is increased towards maximum speed watch the GUI's ACC's Z data. If the ACC Z-data varies more than about 20 points or so then the acc sensor has too much vibration and alt-hold will be affected. Keep in mind that alt-hold is a works in progress so you might not achieve satisfactory results on your model even when everything is working as planned.

- Thomas

bob4432
Posts: 51
Joined: Sat Jan 29, 2011 2:51 am
Location: USA

Re: BMP180 - Anybody working on code for it?

Post by bob4432 »

Thanks again and will try the testing procedure when I rebuild a larger quad than the current mini quad I have been having fun bashing around the condo w/ lately :). I understand about the alt hold being a work in progress, just wanted to make sure my hardware was good w/ the new unit so I do not need to buy any more of the BMP085 units.

Post Reply