Baro keeps incrementing / decrementing its value. BMP085

Post Reply
rsappia
Posts: 2
Joined: Thu Aug 28, 2014 11:49 pm

Baro keeps incrementing / decrementing its value. BMP085

Post by rsappia »

Hello everyone,

i am just having my first steps into the quad world. I am currently flying with a Multiwii Pro + Mtk GPS from habby king. I am using thw 2.3 firmware revision. Everything works just great, The only point that i have to complain about is that the baro is doing something wrong. As i read in many forums, it should be protected from light and wind so i covered it wit a foam.

I wanted to test today the Pos Hold with baro, but i noticed that it wouldnt hold the position at all. Then I started to pay attention to the altitude reading from the multiwii gui, and then I realized that the altitude was being completely wrong calculated. If i switch the multiwii on and just stay on the ground, the calculated altitude will be zero at the beginning, but then, it will start to increase or decrease... without moving it i have reached readings oh -300 meters (?????). I also try to repeat the measurement on my desk and i get the same result. It is like the error is constantly added to the output... is this the way it is supposed to work?

I also observed that when using the RTH, it works ok when the funtion starts... but then, it happens that rhe quad will star going higher when reching th home position ... sometimes happens that it starts descending when it reach the home position... i think the baro is also behind this behaviour...

Could someone give some suggestions to fix this issue? Have anyone had the same experience?

Many thanks in advance!!

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Baro keeps incrementing / decrementing its value. BMP085

Post by Plüschi »

I see 4 problems.

First, wrong section. You have a atmel 2560 processor, which is an old 8 bit thing, but you post in the 32bit section. Wrong place.

Second, poshold doesent really work well with multiwii. Sometimes doesent work at all.

Third, multiwii althold doesent really work well at all. The copter might go into wild oscillations.

Nr4
Your board has a high drop 5V linear regulator. Means if you feed it with a 5V BEC the processor will see only 4.1V and occasionally freak out. This 4.1V then goes to the high drop 3.3V reg, sending only flaky and shaky 3.2V to the sensors.

DONT fly this board in populated areas or near busy roads.

rsappia
Posts: 2
Joined: Thu Aug 28, 2014 11:49 pm

Re: Baro keeps incrementing / decrementing its value. BMP085

Post by rsappia »

Hi my grumpy friend!

thank you very much for your answer, is there any way i can move my question to the right section? I am sorry that i am missing 24 bits to post here :p. I posted from my cellphone and I didn't read the part where it says 32 bits, sorry.

The test I made on my desk were only with usb power, so no way that the becs were having any effect at all. Would you recommend me then to use a separate power supply for the board? it seems to me that the problem could be mor code related than hardware... but anyway i will take a look to your suggestions ;)

what would be your recommendation for a decent flight controller running multiwii?

brm
Posts: 287
Joined: Mon Jun 25, 2012 12:00 pm

Re: Baro keeps incrementing / decrementing its value. BMP085

Post by brm »

rsappia wrote:Hi my grumpy friend!

thank you very much for your answer, is there any way i can move my question to the right section? I am sorry that i am missing 24 bits to post here :p. I posted from my cellphone and I didn't read the part where it says 32 bits, sorry.

The test I made on my desk were only with usb power, so no way that the becs were having any effect at all. Would you recommend me then to use a separate power supply for the board? it seems to me that the problem could be mor code related than hardware... but anyway i will take a look to your suggestions ;)

what would be your recommendation for a decent flight controller running multiwii?


forget the 8 bit world.
http://abusemark.com/store/index.php?main_page=product_info&cPath=1&products_id=30&zenid=2mc0v1jluncbkfnio8hr3tp2t6
it runs the stm32 port of multiwii.

the older bosch device, bmp085, has a sinusoidal swing - normal behaviour.
old board - old baro ;)
buy decent hw.

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Baro keeps incrementing / decrementing its value. BMP085

Post by Crashpilot1000 »

brm wrote:
rsappia wrote:Hi my grumpy friend!

thank you very much for your answer, is there any way i can move my question to the right section? I am sorry that i am missing 24 bits to post here :p. I posted from my cellphone and I didn't read the part where it says 32 bits, sorry.

The test I made on my desk were only with usb power, so no way that the becs were having any effect at all. Would you recommend me then to use a separate power supply for the board? it seems to me that the problem could be mor code related than hardware... but anyway i will take a look to your suggestions ;)

what would be your recommendation for a decent flight controller running multiwii?


forget the 8 bit world.
http://abusemark.com/store/index.php?main_page=product_info&cPath=1&products_id=30&zenid=2mc0v1jluncbkfnio8hr3tp2t6
it runs the stm32 port of multiwii.

the older bosch device, bmp085, has a sinusoidal swing - normal behaviour.
old board - old baro ;)
buy decent hw.


Hehe, I learned to hate that sinusoidal swing of the BMP as well - however I think it is cured with my slightly off datasheet driver: https://github.com/Crashpilot1000/TestC ... p085.c#L88
So after all I think a decent althold can be squezzed out of the BMP.

Cheers Rob

User avatar
Plüschi
Posts: 433
Joined: Thu Feb 21, 2013 6:09 am

Re: Baro keeps incrementing / decrementing its value. BMP085

Post by Plüschi »

Crashpilot1000 wrote:-hate that sinusoidal swing of the BMP as well
-it is cured with my slightly off datasheet driver


Rob, care to explain the changes and the reason / thoughts behind ?

rsappia wrote:Hi my grumpy friend!


Im grumpy because my tricopter with the same board went nuts, uncontrollable, did fly away 100 meters and crashed 3 meters from a busy 80km/h commuter road during peak traffic. Immagine it crashes on the road, a stupid entitled feminist driver gets panic, drives head on into another car and kills 3 people, destroys 4 cars and injures a dog. Who gets the guilty verdict ?

brm
Posts: 287
Joined: Mon Jun 25, 2012 12:00 pm

Re: Baro keeps incrementing / decrementing its value. BMP085

Post by brm »

Plüschi wrote:
Crashpilot1000 wrote:-hate that sinusoidal swing of the BMP as well
-it is cured with my slightly off datasheet driver


Rob, care to explain the changes and the reason / thoughts behind ?

rsappia wrote:Hi my grumpy friend!


Im grumpy because my tricopter with the same board went nuts, uncontrollable, did fly away 100 meters and crashed 3 meters from a busy 80km/h commuter road during peak traffic. Immagine it crashes on the road, a stupid entitled feminist driver gets panic, drives head on into another car and kills 3 people, destroys 4 cars and injures a dog. Who gets the guilty verdict ?


simple answer: do not fly multiwii or baseflight!

User avatar
Crashpilot1000
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: Baro keeps incrementing / decrementing its value. BMP085

Post by Crashpilot1000 »

Plüschi wrote:
Crashpilot1000 wrote:-hate that sinusoidal swing of the BMP as well
-it is cured with my slightly off datasheet driver


Rob, care to explain the changes and the reason / thoughts behind ?

rsappia wrote:Hi my grumpy friend!


Im grumpy because my tricopter with the same board went nuts, uncontrollable, did fly away 100 meters and crashed 3 meters from a busy 80km/h commuter road during peak traffic. Immagine it crashes on the road, a stupid entitled feminist driver gets panic, drives head on into another car and kills 3 people, destroys 4 cars and injures a dog. Who gets the guilty verdict ?


Sorry Plüschie that I missed your question!!
Yes, the explanation is simple: I tried to improve the accuracy of the BMP and after a lot of testing around different methods I ended up with the result you see. It may be a little more precise but as a side-effect it got rid of the swing a great deal. So it may be a discovery by accident... but I guess nobody can really explain or put more reasoning behind it without being a Bosch engineer..
EDIT: So I am not claiming to have invented something etc. but I claim to have the best working BMP driver in Harakiri I've seen in copter (and most probably plane) environment available in open source today. I stand by to be confronted with a better working open source driver and I will full heartedly embrace it without asking for reasons why it is better because hardware has its' own magic and what works better is better IHMO and you also know that. Maybe something Baseflight/Celanflight/Arducopter should take over as well? I think so but I have not so high psychological constrians in taking over code that actually works better. Those psychological constrians must be very high with baseflight and subsequently cleanflight because they took over stuff/proceedings/approaches from Harakiri without giving the slightest form of credit. I am OK with it since the whole community is benefiting from it (and that is without question my primary goal) however I think it's a little bit fishy and the sincere troll TC (and that makes him way better/more sincere than DC IMHO) calls me a mindless copy over dude so it somehow leaves me speechless.
Cheers Rob.

msev
Posts: 186
Joined: Thu Apr 14, 2011 11:49 am

Re: Baro keeps incrementing / decrementing its value. BMP085

Post by msev »

Rob can you please show a video of how good this bmp085 alt-hold is.

Can you prepare a valid PR for baseflight if it indeed improves the bmp085 althold? Since you know your code best :D

Post Reply