Copter Not Maintaining Level - Have to recalibrate every reboot

Hi wicked1,

I had a a similar issue that stress me for so many months and it was really hard to understand whats was the cause (for reference this one one of the post I’ve made Issues for a persistent perfect level : accel calibration + autotrim/save trim).

After that I was thinking the origin was the notch filter applied, because when I disable it the level problem somehow was less present.

But it took me so many headaches to find out that the problem was the FC was to busy! too much processing!
First I was using loop rate at 800 and 1000 plus I had a custom firmware with additional calculations for an indoor localization system. This was the cause, asap I disable my additional calculations the level issue disappear.
…For this reason when I add to the chain the notch filter too, the quad became even worse.

Probably it’s not yours situation, but the symptoms you have seems exactly what I was fighting for so many month :joy: .

Thanks! I do have my loop rate at 800, but I do on another copter too, w/out any problems.
But, this definitely gives me something to check.
Thanks a lot.

Also, I got master installed last night with flash logging support. So, I can make logs now!

I’m busy today, but tomorrow or this weekend I will get some logs and hopefully figure this out.

Yes you need logs!
and if you are using more than 400 loop rate and depending by the FC and its MCU if you observe carefully the normal stabilize flight you can see difference!

When you are close to the limit of our MCU for example I can’t use the EKF3 (its more processor intense), instead with the EKF2 the flight its perfect stable in all test I’ve made.

Moreother in that situation also disabling the logs helps to determine a perfect flight or the more item in the logs I ask and more micro oscillation in normal flight.

All above with the usual F4 on the Pixracer.

Hope it helps!

1 Like

Wicked1-I think I have seen this also when playing around with high loop rates in the 800 range (Omni F4 nano V6). I noticed after a minute of hovering the quad would start to slowly roll left until full stick wouldn’t correct it. So on the bench I could actually see this holding it in my hand at a low throttle. The HUD would indicate a slow roll which of course wasn’t happening. I put this quad on the shelf frustrated w/o logging but logging is functional now on it so I’ll get back to this. Loop rate back to 400 for now.

My other nano v6 has absolutely no problems w/ the same settings (I copied the config from it). But, this definitely sounds like the issue I’m having.
Did you verify that once you went back to 400, it was ok?
Did you look at your CPU load? (There’s a CPU Load readout in the “status” screen in MP). My working copter @800 had a load of about 38%, at idle sitting on the bench… I never looked while I was flying, and didn’t have logging at the time.
I don’t know what this new one is.
I can’t wait to get some logs this weekend!

Thanks Dave.

Actually I have it back on the bench now as its peaked my interest but haven’t flown it yet. Weather is terrible here, maybe I’ll try the basement. At 400 load is ~28%, at 800 it’s ~50%. If it makes any difference (not sure yet) logging is set to default (958). I haven’t done anything with logs yet but it’s so nice to know they are there!! Maybe it needs quite a bit of overhead for the IMU? One would think 50% would be OK. Then I look at my F7 board and it’s single digits…

Arg, I tried having a quick flight, and it’s completely unflyable w/ master on it…
I disabled logging, and set my loop rate to 400 w/out any change… It just oscillates.

Well, I’m signing off for now. I’ll try some things later.

OK, that issue was that the default orientation for the board in the hwdef changed, so I had to change my setting.
Now I’m really leaving…

Man, you were not kidding, it went crazy. What changed and how to did you correct it?

Never mind, I can see the result in the HUD. The hazards of master! Yaw 90 did the trick. USB connector on top and on the right side on my quad.

And it flies. Not enough room to test much but a few minutes of hovering in Stabilize looks OK.

OK, I think it’s safe to ignore all my previous troubleshooting…

Today I noticed the hud appeared tilted while I was holding the copter level in the air by giving it some roll input.

So, I level the copter. Take off, it flies level. It slowly starts tilting to the left, but the HUD still appears level. I let it build up some error so it’s pulling strongly to the left…
I land and place the copter back on a level surface, and the hud is tilted. It slowly corrects.

What could cause this?
Vibrations? (My vibes are very low on this copter)
Bad FC? (I hope not!)
Anything else? Tuning? (It’s smooth, no oscillations)

Now it really sounds the same as the issue Dave and Giorgio were having… Only my loop rate is currently at 400 and it’s doing it… Though not so severely. Mine is only off a couple degrees.
@dkemxr, let me know if yours is still pulling to the side even a little w/ the lower loop rate.

thanks for any help

Log:
https://drive.google.com/open?id=1vHSTSdOTu_Ng0JSaFeYLUgudAVwZH3rP

If you have any main power wires near your the flight controller you should twist them and move them away because they can affect the gyro’s and acclerometers.

It is definitely related to power or vibrations… Something about the motors spinning.
If I hover, it takes a few minutes to get to a certain point… If I hold it in my hand and give it full throttle for about 30 seconds, it’s at that same level of… unlevel.

I do have power wires under my FC, due to the way my ESC is made. It’s a 4 in 1 ESC so is directly under my flight controller. It has the power pads in the middle, so they’re between the ESC and FC for a short distance… The wires are tightly twisted, up to the power pads. But that’s right in the middle of my flight controller.
The gyro’s and accel’s are on the top of the board, and not even directly over the wires… But, this is a tiny copter, so everything is close.

This will be difficult to change, but I might need to try it…
Thanks for the suggestion.

This seems to me similar to a problem I had described here:

But I never solved that issue, I changed FC and all went OK, I thought that was a faulted IMU.

That’s what I’m afraid off… Bad IMU… I don’t want to swap the FC! I love directly soldered connections when things work out, but not fun when there’s a problem.

And URG… It seems like 50% of the stuff I buy related to this hobby is faulty… On just this copter I’ve already found, brand new, a bad motor (disconnected stator wire), ESC (one output wasn’t stable until about 25% throttle), and now maybe the FC… I think we’d all be better off if we paid a little more and actually had some QC at the factories… Less wasted materials… Less shipping bad products around the world, etc…

I’ll try a few more things, and wait for maybe a couple more replies before I give in and buy another FC. Since some people are having the exact same symptoms related to the loop rate or other settings, I still have a little hope it’s something that can be solved…

Im not sure how well ardupilot code handles electromagnetic interference from a 4 in 1 esc being below the flight control board. If I were in your shoes I would move to individual esc’s away from the flight controller.

It’s a 3" prop, 90 gram copter… Not really an option.
But, I will do what I can… (I ordered a different ESC w/ the power connectors at the rear)
I have two other copters built w/ the same FC and same arrangement, w/ the ESC directly under the FC, and they’re working fine… I’m thinking it might be the power cables that are between the FC and ESC on this particular build. Hopefully the new ESC fixes the situation…

And, w/out a doubt, these small FC’s and 4in1 esc’s are becoming standard… Everything is getting smaller.
I don’t think it will be long before I can have a gimbal on a little 3" copter. I can already do optical flow and lidar… Things are getting small, fast!

Another idea that comes in my mind regard to this problem is that this sensor (IMU) need low noise power supply, is this satisfied on our boards?
Maybe it is OK by project but some components in some boards could be of low quality or wrong value or damaged. The same board is built by diverse manufacture with diverse quality controls.
I don’t know, only some hypothesis.

You haven’t mentioned reflashing the board, or if you did I missed it.

Had a 250 start this sort of thing, but it would be level at boot and then drift right more and more until you were at full stick deflection for level flight.
Tried all sorts of things as you have but it still did it.
In a desperation move (and on a hunch) I erased and reflashed the board (Pixracer) and all was well.

I have done that.
I changed my mounting yesterday because I could see how maybe vibrations could cause something like this, and I’m using different mounts on this copter than my others that are similar w/out problems.

It helped! But, I don’t think it’s vibrations… A result of the different standoffs is the FC is about 2mm higher above the ESC. And now I have to give it more throttle before it starts tilting. It’s still unacceptable, though… It’s off by about 5 degrees after a regular speed flight. Nearly 10 degrees after a high speed flight.

I also tested my other small copters that also have a 4in1 esc under the FC, and they actually do it too, though not much… I have to give them full throttle for several seconds, then go back to hover, and they pull to the side… but quickly recover in just a few seconds while hovering… It’s nothing I’d notice in regular flying.

SO I still don’t know… But I’m starting to think Jose or Andrea’s electrical interference idea might be correct.
I have a new ESC and FC on the way… I’ve mostly given up on it being a software or settings issue.
What’s frustrating is I occasionally get a flight where it’s perfectly fine… But in 9 out of 10 flights, it pulls to the side more based on the amount of throttle I give it.

I want to mention, I got a new ESC, and it helped.
Previously, I had set my loop rate back down to 400, and it was still going out of level.
I rebuilt w/ the new ESC and more separation between the FC and ESC, and at 400, it’s fine.
Today I increased the loop rate to 800, and it started tilting to the left again. I can hold the copter down on the bench, give it some throttle, and watch the HUD level change. Then I turn off the throttle and it goes back to level.

So, maybe a combination of interference and that loop rate parameter.
I don’t know… I quit for now. I’ll leave my loop rate at 400. I do have another FC, so maybe some day I’ll replace the FC to see if that makes any difference. Like I’ve said, I have two other omnibus nano’s running @ 800, and they’re fine.