BMP085
BMP085
I´we done some experiments on
Altitudehold with the BMP085 Barometer
It´s not easy to Get it to work perfekt.
In the MWiiGui it´s pssible to se that it´s drifting in height +/- 1 meter while standing on the table.
Is mine faulty or isn´t the presition better?
I´we modified the code so it´s working as god as one can expect.
The Althold works pretty god when it´s free from the groundeffect.
The areas i´we changed is clearly marked.
The configuation varibles is placed in the
/****CONFIGURABLE PARAMETERS****/
If diffZ is to high it will bounce up & down. To low will make it lame.
limitTH Will limit the throttlerange the baro is allowed to work in.
When Baromode is enabled
It creates a "dead" span on the trottlestick To let the Baro work undisturbed.
Move throttlestick outside the span and the MWii will ove up or down.
Move stick within the span and it will return to Altitudehold.
/PatrikE
Altitudehold with the BMP085 Barometer
It´s not easy to Get it to work perfekt.
In the MWiiGui it´s pssible to se that it´s drifting in height +/- 1 meter while standing on the table.
Is mine faulty or isn´t the presition better?
I´we modified the code so it´s working as god as one can expect.
The Althold works pretty god when it´s free from the groundeffect.
The areas i´we changed is clearly marked.
The configuation varibles is placed in the
/****CONFIGURABLE PARAMETERS****/
If diffZ is to high it will bounce up & down. To low will make it lame.
limitTH Will limit the throttlerange the baro is allowed to work in.
When Baromode is enabled
It creates a "dead" span on the trottlestick To let the Baro work undisturbed.
Move throttlestick outside the span and the MWii will ove up or down.
Move stick within the span and it will return to Altitudehold.
/PatrikE
- Attachments
-
- MultiWiiV1_7_althold.rar
- (21.47 KiB) Downloaded 278 times
Re: BMP085
Good work...
I have been playing with althold on my Mikro quad and the 50cm quad and 1.7
On the mikro it stays inside a window of about 1-2 meters. On the larger quad the window is 4-6 meters....
I will try this out one of the coming days!
In a future version, can we make the Althold MK-style:
Althold is tied to throttle stick when activated. Midstick is hold. Down the stick to descend, up the stick to ascend.
Thanks
Jussi
I have been playing with althold on my Mikro quad and the 50cm quad and 1.7
On the mikro it stays inside a window of about 1-2 meters. On the larger quad the window is 4-6 meters....
I will try this out one of the coming days!
In a future version, can we make the Althold MK-style:
Althold is tied to throttle stick when activated. Midstick is hold. Down the stick to descend, up the stick to ascend.
Thanks
Jussi
Re: BMP085
I have also mad some changes.
If you change this paramter you can change the sensibliyty of the barometer:
I do not test your code because I have no time.
But I have changed the origianl Code
http://www.rcgroups.com/forums/showpost ... ount=13813
I geht sometimes good results, and sometimes I get bad results (resonance frequency), but I don´t know why.
If you change this paramter you can change the sensibliyty of the barometer:
I do not test your code because I have no time.
But I have changed the origianl Code
http://www.rcgroups.com/forums/showpost ... ount=13813
I geht sometimes good results, and sometimes I get bad results (resonance frequency), but I don´t know why.
Re: BMP085
Hi Patrik and Druckgott..
Thanks for these additions. Sadly none of these mods work with the latest dev version.
Is there anyway this can integrated into the Dev version? I really like the magneto calibration and the new angle calc in the dev version....
I am seeing the same as you having having tested a ridiculous amount of BMP sensors now. It seems that there is more drift at lower temperatures, though...So maybe something in the temp -> pressure calculations is causing this! But I think that we should not expect more than about 1 meter accuracy with this sensor and the current code....(even though Bosch states it should be accurate to 14CM with oversampling)
To me 1 meter is absolutely fine, though. The key is to get to get the response smoothened out, so we dont get the up and down oscillations....
Thanks
Jussi
Thanks for these additions. Sadly none of these mods work with the latest dev version.
Is there anyway this can integrated into the Dev version? I really like the magneto calibration and the new angle calc in the dev version....
I am seeing the same as you having having tested a ridiculous amount of BMP sensors now. It seems that there is more drift at lower temperatures, though...So maybe something in the temp -> pressure calculations is causing this! But I think that we should not expect more than about 1 meter accuracy with this sensor and the current code....(even though Bosch states it should be accurate to 14CM with oversampling)
To me 1 meter is absolutely fine, though. The key is to get to get the response smoothened out, so we dont get the up and down oscillations....
Thanks
Jussi
Re: BMP085
I think another problem is that the barometer works at 400 MHZ, but if you read the values, there are 2- 6 values which are all the same.
Example: you get an altitude: (copter standing on the table without running motors)
1
1
1
1
-3
-3
6
6
6
6
7
0
0
.
.
.
so if you use a PID actuator you have the problem what you have 3 times the same value then the pid actuator don´t work perfekt
I think we should use not all the values. We should you every third value or so.
Or we should build some arithmetic average over 20 values but there is the same problem.
Example: you get an altitude: (copter standing on the table without running motors)
1
1
1
1
-3
-3
6
6
6
6
7
0
0
.
.
.
so if you use a PID actuator you have the problem what you have 3 times the same value then the pid actuator don´t work perfekt
I think we should use not all the values. We should you every third value or so.
Or we should build some arithmetic average over 20 values but there is the same problem.
Re: BMP085
i tried your mod druckgott, but it doesn't work for me...only one time at high altitude it worked for a while...
what i have to change? what do your values if changed?
what i have to change? what do your values if changed?
Re: BMP085
The big problem is the difference in the values.
-3
-3
6
6
6
6
7
Between -3 an 7 is a difference of 1 meter!.
Jussi....
I have added my Hack i integrated into the Dev version.
I´m at work so i can´t test it, but feel free to test it on your own risk...
I will test it to morrow.
/Patrik
*Edit Removed old link.*
-3
-3
6
6
6
6
7
Between -3 an 7 is a difference of 1 meter!.
Jussi....
I have added my Hack i integrated into the Dev version.
I´m at work so i can´t test it, but feel free to test it on your own risk...
I will test it to morrow.
/Patrik
*Edit Removed old link.*
Re: BMP085
PatrikE wrote:The big problem is the difference in the values.
-3
-3
6
6
6
6
7
Between -3 an 7 is a difference of 1 meter!.
It´s only an example that you see there are comming 2 ore three times the same number
Re: BMP085
arnaldo wrote:i tried your mod druckgott, but it doesn't work for me...only one time at high altitude it worked for a while...
what i have to change? what do your values if changed?
By me it also do not work eavry time. Somtimes it work somtimes I gad bad results, I don´t know why
Re: BMP085
druckgott. Your Example was realistic.Thats the problem...
I have tested the code and made som adjustments in it.
It´s now flyable.
I can fly eights & Squares at 2meters height within +/- 0,5m (Hands off ThrottleStick)
But there is some "dips" probably caused by the baro where it looses 1m.
It recovers without assistace.
I´we tried to do it the MK-Way but can´t get a god resault with it.
Concentrating on getting the hold function to work first.
/Patrik
I have tested the code and made som adjustments in it.
It´s now flyable.
I can fly eights & Squares at 2meters height within +/- 0,5m (Hands off ThrottleStick)
But there is some "dips" probably caused by the baro where it looses 1m.
It recovers without assistace.
I´we tried to do it the MK-Way but can´t get a god resault with it.
Concentrating on getting the hold function to work first.
/Patrik
- Attachments
-
- MultiWii_dev_110504.rar
- (26.72 KiB) Downloaded 262 times
Re: BMP085
Could be where any posibility to combine this this this an acceleromtert, so the copter nows if it is going down. So this will help the barometer to get besser relults.
Whis NK or motion plus?
What do you mean to combine this.
I have also make some changes in the code and implement a average value and an pid actuator, but I can´t test it now. I will test it on the weekend.
druckgott
Whis NK or motion plus?
What do you mean to combine this.
I have also make some changes in the code and implement a average value and an pid actuator, but I can´t test it now. I will test it on the weekend.
druckgott
Re: BMP085
Hello patrick...i tried your mod(first post) and it works with default parameter....i have a 0,5m of amplitude and sometimes 1meter...
can i try to change the first parameter??? i have to improve of 1 unit or much? how this parameter works?
can i try to change the first parameter??? i have to improve of 1 unit or much? how this parameter works?
Re: BMP085
Hi arnaldo,
Glad it works for you..
The first parameter is an amplifier and increases the correction.
Increase by 1 unit at a time. (I started testing at 1.05 )
I tried 5 and 10 also.
At 10 it was overshooting... I think maximum 6-7 is ok.
But try the Dev version it became better i think.
Made some more adjustments to it.
The 1 meter deviations depends on the baro.
If you look in the MultiWiiGUIf it´s possible to se that the altitude changes when the MultiWii sits on the table.
The GUI presents the altitude in dm.
/Patrik
Glad it works for you..
The first parameter is an amplifier and increases the correction.
Increase by 1 unit at a time. (I started testing at 1.05 )
I tried 5 and 10 also.
At 10 it was overshooting... I think maximum 6-7 is ok.
But try the Dev version it became better i think.
Made some more adjustments to it.
The 1 meter deviations depends on the baro.
If you look in the MultiWiiGUIf it´s possible to se that the altitude changes when the MultiWii sits on the table.
The GUI presents the altitude in dm.
/Patrik
Re: BMP085
ok...i will try it soon as possible....i see parameter 3 and 600?!?!?!?! woow....
Re: BMP085
Open MultiWii_dev.pde with Arduino.
It will open all the PDE-files and h-file.
Change the settinngs in config.h.
Upload the sketch. All files will be loaded in the board.
You can use the MultiWii_dev-gui from SVN
http://code.google.com/p/multiwii/source/browse/trunk/dev_version/MultiWii_dev20110504.zip
/Patrik
It will open all the PDE-files and h-file.
Change the settinngs in config.h.
Upload the sketch. All files will be loaded in the board.
You can use the MultiWii_dev-gui from SVN
http://code.google.com/p/multiwii/source/browse/trunk/dev_version/MultiWii_dev20110504.zip
/Patrik
Re: BMP085
The Plejad Celaeno Copter does use the BMP085 too.
I haven't tested it, but i hope i can do it at the weekend.
One important thing, which is in the manual of the Celaneo Copter is, that the sensor should be mounted with some foam material and dark heatshrink.
1. to reduce wind effects of props.
2. to block light
that should help to get better values.
I haven't tested it, but i hope i can do it at the weekend.
One important thing, which is in the manual of the Celaneo Copter is, that the sensor should be mounted with some foam material and dark heatshrink.
1. to reduce wind effects of props.
2. to block light
that should help to get better values.
Re: BMP085
mine is uder arduint that is in a capsule no wind...no light
Re: BMP085
arnaldo wrote:mine is uder arduint that is in a capsule no wind...no light
same as my
Re: BMP085
Guys, I can see you are making headway with this...I am setting up to try the dev version now! I know Alex is working a Z-accel integration to the height hold function....
I stumbled on this over on Youtube - Kalman filtering for BMP O85. It looks interesting, but I am clueless as to whether or not we can afford to use more cycle time for additional filtering:
http://www.youtube.com/watch?v=_LfHF2D5 ... re=related
I stumbled on this over on Youtube - Kalman filtering for BMP O85. It looks interesting, but I am clueless as to whether or not we can afford to use more cycle time for additional filtering:
http://www.youtube.com/watch?v=_LfHF2D5 ... re=related
Re: BMP085
hi patrick...why with your dev version baro and magneto work....with original dev...they work in gui...but not in flight...
however magneto also in your dev works badly....when i pitch or roll the arrov in gui turn...
however magneto also in your dev works badly....when i pitch or roll the arrov in gui turn...
Re: BMP085
Hallo PatrikE, today I testet the dev version with your inclution.
But if I switch on the altitude mod, the copter falls down like a stone.
But if I switch on the altitude mod, the copter falls down like a stone.
Re: BMP085
Hi,
today I have tested the first version from here and the second dev version.
The first one works preaty good i only have an ampitude abound 1 meter.
the dev version don´t work If I switch to altitude mod, the copter falls downl like a stone because the motors are going down with the rpm.
My version I will test the nex days
today I have tested the first version from here and the second dev version.
The first one works preaty good i only have an ampitude abound 1 meter.
the dev version don´t work If I switch to altitude mod, the copter falls downl like a stone because the motors are going down with the rpm.
My version I will test the nex days
Re: BMP085
i tried the first and the last dev....
they work...
i don't know why in the original dev(alex dev) in the gui baro and compass work...but in flight when i switch them they don't work
i think the best value is 2.... and when you switch baro you have to be stationary in altitude otherwise the quad start to rising and falling in resonance
they work...
i don't know why in the original dev(alex dev) in the gui baro and compass work...but in flight when i switch them they don't work
i think the best value is 2.... and when you switch baro you have to be stationary in altitude otherwise the quad start to rising and falling in resonance
Re: BMP085
Althold-mod works best if it´s activated from a stationaty altitude.
The position of throttlestick and altitude is memorised and creates a dead span around that position.
If throttle is moved outside the span it will rise or decsend.
When moved back in the dead span it will try to recover the height where althold was activated.
If throttle is riced to much it will rice rapidly at MAXTHROTTLE.
If throttle is lowered to much it will go to MINTHROTTLE and fall like a stone.( Unwanted Behavior)
I havn´t done anything with the Mag as far as i now.
Hope my mod dont affect it.
/Patrik
The position of throttlestick and altitude is memorised and creates a dead span around that position.
If throttle is moved outside the span it will rise or decsend.
When moved back in the dead span it will try to recover the height where althold was activated.
If throttle is riced to much it will rice rapidly at MAXTHROTTLE.
If throttle is lowered to much it will go to MINTHROTTLE and fall like a stone.( Unwanted Behavior)
I havn´t done anything with the Mag as far as i now.
Hope my mod dont affect it.
/Patrik
Re: BMP085
Currently my FTDI device is acting weird so I can't program the arduino and test this.
But one of the things I wanted to try was to prevent the temperature to be read on each cycle.
Some of the comments I've read is that it's readings aren't smooth and it has noise causing/inflating the results
when combined with pressure values.
So basically the idea was to read it once on init and use the same constant value from there on. As here the idea is not
to determine the exact altitute this doesn't seem to be of any problem.
But one of the things I wanted to try was to prevent the temperature to be read on each cycle.
Some of the comments I've read is that it's readings aren't smooth and it has noise causing/inflating the results
when combined with pressure values.
So basically the idea was to read it once on init and use the same constant value from there on. As here the idea is not
to determine the exact altitute this doesn't seem to be of any problem.
Re: BMP085
PatrikE wrote:If throttle is riced to much it will rice rapidly at MAXTHROTTLE.
If throttle is lowered to much it will go to MINTHROTTLE and fall like a stone.( Unwanted Behavior)
Ok but I have the stick on a postion witch on the baro and then the copter falls down.
Not after moving the stick
Re: BMP085
druck....have you tried original DEV? baro and magneto work in flight? mine work in gui but not in flight...
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: BMP085
arnaldo wrote:druck....have you tried original DEV? baro and magneto work in flight? mine work in gui but not in flight...
It's a small bug in the last dev: baro and mag switch have no effect.
I will correct it in a next dev (maybe today)
Re: BMP085
Druck...
This is the DEV version i made the mod in.
http://wbb.multiwii.com/download/file.php?id=142
It´s build from orginal DEV from Alex.
That version works for me and arnoldo.
Make shure thats the one you test.
I have not tried the last dev from svn yet.
/Patrik
This is the DEV version i made the mod in.
http://wbb.multiwii.com/download/file.php?id=142
It´s build from orginal DEV from Alex.
That version works for me and arnoldo.
Make shure thats the one you test.
I have not tried the last dev from svn yet.
/Patrik
Re: BMP085
Hi,
yesterday I have crashed my Quadcopter at to much loopings so one motor is dead.
But I have orderd a new one yesterday. I hope I will have it for next weekend. Then I will test this dev version.
yesterday I have crashed my Quadcopter at to much loopings so one motor is dead.
But I have orderd a new one yesterday. I hope I will have it for next weekend. Then I will test this dev version.
Re: BMP085
druckgott wrote:Hi,
yesterday I have crashed my Quadcopter at to much loopings so one motor is dead.
Hey. You still have 3 motors...
Rebuild it to a tricopter...
Re: BMP085
with the last dev...5008...baro seems to work badly...it spin up 2 3 times and go into the stratosphere...
also compass works badly on pitch and roll axes....
also compass works badly on pitch and roll axes....
Re: BMP085
PatrikE wrote:druckgott wrote:Hi,
yesterday I have crashed my Quadcopter at to much loopings so one motor is dead.
Hey. You still have 3 motors...
Rebuild it to a tricopter...
no thank you I love my quad
But the middle bar is bent very hard so I can directly build a tricopter
No I hope the motor will come in some days.
But I have to say that the barometer works very good with the first version from this post here. I only have a Amplitude of 1 meter, sometimes only 50mm.
Re: BMP085
druckgott wrote:
But I have to say that the barometer works very good with the first version from this post here. I only have a Amplitude of 1 meter, sometimes only 50mm.
Nice!
Then im on the right track..
Alex.
Is the baro oversampled?
I can't locate it in the code.
If not it could inprove the resolution.
And when i tried to modify the newest dev from 0508.
My NK is not found.?..Only WMP + BMP
Tried on both Mega and an MiniPro with different sensors. with Pullup and without.
But same result
/Patrik
Re: BMP085
this is a video test of your dev Patrik!
http://www.youtube.com/watch?v=3dkU1L0vZI8
http://www.youtube.com/watch?v=3dkU1L0vZI8
Re: BMP085
do anybody of you testet the new dev from
MultiWii_dev20110516.zip
there is some new altitude code:
druckgott
MultiWii_dev20110516.zip
there is some new altitude code:
Code: Select all
#if defined(BMP085)
if (baroMode) {
int16_t throttleAltitudeAdjust;
static int16_t errorAltitudeI;
static int16_t lastErrorAltitude;
if (abs(rcCommand[THROTTLE]-initialThrottleHold)>20) {
baroMode = 0;
ITerm = 0;
}
error = altitudeHold - altitudeSmooth;
errorAltitudeI += error/3;
errorAltitudeI = constrain(errorAltitudeI,-14000,14000);
PTerm = P8[PIDALT]*error/10; //2.5
ITerm = I8[PIDALT]*errorAltitudeI/200; //0.002
DTerm = D8[PIDALT]*(error-lastErrorAltitude); // 20
lastErrorAltitude = error;
throttleAltitudeAdjust = PTerm + ITerm + DTerm;
rcCommand[THROTTLE] = initialThrottleHold + constrain(throttleAltitudeAdjust,-50,+50);
// rcCommand[THROTTLE] = rcCommand[THROTTLE] + constrain((acc_1G-accADC[YAW]),-100,+100);
}
#endif
druckgott
Re: BMP085
I would like to add BMP085 to my board.
I don't have LCC on my board, everything is powered by 3.3V. So can I just connect all the wires from BMP085 directly to ADLX345?
I was looking this diagram.
I don't have LCC on my board, everything is powered by 3.3V. So can I just connect all the wires from BMP085 directly to ADLX345?
I was looking this diagram.
-
- Posts: 1630
- Joined: Wed Jan 19, 2011 9:07 pm
Re: BMP085
quadslo wrote:I would like to add BMP085 to my board.
I don't have LCC on my board, everything is powered by 3.3V. So can I just connect all the wires from BMP085 directly to ADLX345?
I was looking this diagram.
Hi,
yes, you don't have to connect something more, only 4 wires.
Re: BMP085
did anyone try last dev? can you have good resutls with baro mode?
i tried with different PID values but i'm not able to have a good alth hold.... at the moment the best Multiwii baro mode is that of Patricke
i tried with different PID values but i'm not able to have a good alth hold.... at the moment the best Multiwii baro mode is that of Patricke
Re: BMP085
Today I have testet the new dev version.
But the baro don´t work for me.
If I switch it on, the copter falls down.
Best version for me ist this which is here in first post.
Any other tested newest dev?
But the baro don´t work for me.
If I switch it on, the copter falls down.
Best version for me ist this which is here in first post.
Any other tested newest dev?
Re: BMP085
Today I have testet the new dev version.
But the baro don´t work for me.
If I switch it on, the copter falls down.
Best version for me ist this which is here in first post.
Any other tested newest dev?
But the baro don´t work for me.
If I switch it on, the copter falls down.
Best version for me ist this which is here in first post.
Any other tested newest dev?
Re: BMP085
Hello!
What are the current status (running1.8)
Alt hold is implemented and perfected?
I added my BMP085 to a Paris board
(bought long time ago but never got to use it)
I also added AXL345 instead of NK and will see how the outcome is...
(Backup NK is ready for a transplant if necessary)
//UndCon
What are the current status (running1.8)
Alt hold is implemented and perfected?
I added my BMP085 to a Paris board
(bought long time ago but never got to use it)
I also added AXL345 instead of NK and will see how the outcome is...
(Backup NK is ready for a transplant if necessary)
//UndCon
Re: BMP085
Alt hold is implemented and perfected?
There have been reports of some successes. I've tried (and tried) and alt-hold is very inaccurate/unusable on my big quad. So I'm holding on for a miracle in the next firmware release. But you never know, you may have better luck than me.