MegaPirateNG / ardupilot-mpng

MegaPirateNG
GNU General Public License v3.0
116 stars 104 forks source link

Alt hold activated from stabilize-> copter went sky high full speed #179

Open Espenf opened 9 years ago

Espenf commented 9 years ago

Bad experience with alt hold / loiter, went ballistic sky high ending with total crash, new frame etc now mounted. I was going to try Autotune, and this is to be done in alt hold mode according to description http://copter.ardupilot.com/wiki/autotune/ . Unfortunally not possible to log with this board, HK Red with 3.1.5R2 using flash tool. I am for the moment back to start, able to hover and control in stab mode. Performed the initial setup (tested the wizard in MP, all test passed) and did compassmot using Velcro (friction rings) and rubberband to make load on the motors without propellers => (8%). I would like to upload my parameters if somebody can take a look at them it would be great. What is the latest release here now R2 or ?

smurfy commented 9 years ago

Whats your baro readings (altitude?) do they look ok or are jumpy?

Do you use a foam at your baro?

ralenekov commented 9 years ago

This is always due to vibrations! Did you balance your motors, props and put some sticky foam under the board?

Espenf commented 9 years ago

Hi smurfy and ralenekov, I have only checked the baro readings when testing indoor. They look more or less ok, I mean the value will be approx. 0 after arming, then if I lift up or lower the quad they will change. Have only tested from -1 to + 1m by hand. Also I notice that it will decrease the value after maybe 2-3 hours it can show -4meters or so. The board have black foam on the barometer and black tape on top of foam to avoid disturb from prop or sun, and the board was inside plastic housing. The housing was fixed with sticky foam to the frame. I see the point of vibr damping and have now received a dampening plate (same as used for FPV) to mount on. I will try this. Anyone that can take a look at my parameters, and where to upload would be great..:)

DRSuchong commented 9 years ago

Hello, i have the same problem, eeprom cleared and reflashed about 3 times, always the same. (In MPNG 3.0.1 no problems!), tried THR_ALT_P to 0 --> same problem. Always Full throttle if activating from STB --> AltHold, THR_ALT_P range is from 1.00 to 3.00 ??!?!? something is wrong here.

Sir Alex can you provide us a solution? That would be great, than we can use the 3.1.5 without problems! I dont know what wrong, because my Baro is shielded with foam and had in 3.0.1 no problems!

Thanks in advance

SirAlex commented 9 years ago

@DRSuchong , First of all, you must check baro, like Espenf described above. Then you must check vibrations and use dampers to reduce it, also do not forget to balance your propellers.

DRSuchong commented 9 years ago

thanks for your answer, i checked this, it shows in mission planner for example 0.8m +- 15cm it varies a bit, but this is caused by the old baro on the HK Red board, i balanced my carbon props also, vibrations are at minimum.

And why it gives also full throttle with THR_ALT_P=0? range from 1.00 to 3.00 is also strange....

with 3.0.1 i had no issues over a couple of months, and with 3.1.5 i have major issues. If i find no solution i will flash back to 3.0.1..

FranzAr commented 9 years ago

@DRSuchong Could you solve that problem. I have the same issue and tried all the solutions above with no luck. Just falling like a rock in Alt Hold.

DRSuchong commented 9 years ago

No sorry, had no Luck i flashed back to 3.0.1 ;) now it works fine again

Espenf commented 9 years ago

I did not get any response for the parameter check request so I have not done any new testing.. saved a frame a guess. Believe I have to take your advice DRSuchong. It's bad because I want to use Autotune feature. Anyone knows if some updates are planned for? Agree, why it gives full throttle with THR_ALT_P=0? range from 1.00 to 3.00 is also strange....

FranzAr commented 9 years ago

So I have to go back to 3.01, sad. I have my PIDs pretty much dialed in, so I don't need Autotune atm. Would be nice to have, but needs Alt Hold to work. How to break the cycle ...

1Quadman commented 9 years ago

I have a AIOP V2 flight board I am running 3.1..5.R2. Mine goes into ALT Hold work fine but mines seems to drift and I have to keep moving it back to while the Autotune is running. Does anyone have any ideals on why it drifts?

gergalyb commented 9 years ago

I have the same problem with HK red Multiwii pro on MPNG 3.1.5r2. It worked alright on 3.0.1. I have vibration dampening foam under the FC, foam and sun shielding on the baro and I have balanced props. Looks like I have to go back to 3.0.1 :(

1Quadman commented 9 years ago

have you tried anything on this link? http://copter.ardupilot.com/wiki/common-diagnosing-problems-using-logs/

On Sat, Feb 21, 2015 at 8:02 AM, gergalyb notifications@github.com wrote:

I have the same problem with HK red Multiwii pro on MPNG 3.1.5r2. It worked alright on 3.0.1. I have vibration dampening foam under the FC, foam and sun shielding on the baro and I have balanced props. Looks like I have to go back to 3.0.1 :(

— Reply to this email directly or view it on GitHub https://github.com/MegaPirateNG/ardupilot-mpng/issues/179#issuecomment-75375308 .

Espenf commented 9 years ago

HK red Multiwii pro does not have possibility to log flight data

1Quadman commented 9 years ago

So I tried to install 3.0.1 on my AIOP v2 I could not get it to arm. So I am trying 3.1.5.r5 again. I wonder how good the 32bit board is and how much. On Feb 21, 2015 10:31 AM, "Espenf" notifications@github.com wrote:

HK red Multiwii pro does not have possibility to log flight data

— Reply to this email directly or view it on GitHub https://github.com/MegaPirateNG/ardupilot-mpng/issues/179#issuecomment-75382209 .

yohendry commented 9 years ago

same problem here, 3.0.1 works fine, 3.1 high full speed is not hardware, cause all works fine on 3.0.1

faccan commented 8 years ago

Yes I think we have finally the answer. The problem for the althold (loiter, etc) for the HK Red Board Multiwii Pro in the version 3.1.5 r2 is In libraries folder AP_InertialSensor -> AP_InertialSensor_ITG3200.cpp file.

you have to change this 2 line:

line 25 float AP_InertialSensor_ITG3200::_accel_scale_1G = (GRAVITY_MSS / 2730.0f); // 2730 LSB = 1G edit to float AP_InertialSensor_ITG3200::_accel_scale_1G = (GRAVITY_MSS / 1024.0f); // 1024 LSB = 1G

line 349 hal.i2c->writeRegister(_accel_addr, 0x35, 3<<1); // range = 8G edit to hal.i2c->writeRegister(_accel_addr, 0x35, 5<<1);

in that way we solve the wrong setting and your copter will calculate the right altitude combining barometer and accelerometer.

is good idea if you change this other file to solve failure in cal accelerometer.

In libraries folder AP_InertialSensor -> AP_InertialSensor.CPP file Line 480 (or near) find :

if( accel_offsets.is_nan() || fabsf(accel_offsets.x) > 3.5f || fabsf(accel_offsets.y) > 3.5f || fabsf(accel_offsets.z) > 3.5f ) { success = false; }

Edit to

if( accel_offsets.is_nan() || fabsf(accel_offsets.x) > 4.0f || fabsf(accel_offsets.y) > 4.0f || fabsf(accel_offsets.z) > 4.0f ) { success = false; }

Regards!!!

DRSuchong commented 8 years ago

thanks for your solution, do you tested this setting extensively? If this works fine, i would reflash my HK board ;), do we have to edit Line 25, 349, and 480 all together?

faccan commented 8 years ago

Hi, I just do some bench test, you would try also with no prop on and no motor spinning just monitoring the outputs level and altitude. To compare between original 3.1.5 rc2 and this mod you have to move or add some vibration because the problem in this case is in the acelerometer, wich is used to calculate fast change in altitude.

If you add some vibration (with a phone or little shaking) to the copter with original firm you will see a big altitud change. If you modify 2 files all together, do acelerometer calibration and try same test you will see that is much more stable. Why? We change acelerometer scale from 3G to 8G...

Be safe try this without propellers!!!

Regards

DRSuchong commented 8 years ago

Hi, i have bad news, I flashed the new "changed" firmware 3.1.5 with your settings above and the error is still there, If I give 0-50% throttle the motors stop and 50-70% it gives full throttle, I tested this with props mounted (hold down on the floor) :-(, I also cleared eeprom made PID settings a.s.o do someone else tested it? Thanks! Regards