gon

  • *
  • 30
Problems with Altitude Hold and barometer
« on: May 13, 2017, 04:01:52 pm »
Hi,

I'm having a lot of problems trying to fly in altitude mode with my quadcopter. I had a previous Revo board which was flying very well in altitude hold. With the same setup but replacing the flight controller for a new Revo, flying in altitude hold is crazy. (manual is fine)

I attach the barometer scope (ground level) which I believe it's okay. I also attach a video showing its behaviour when I enter in altitude hold: https://drive.google.com/file/d/1wiJNVGD73g0PWN140jdjUmIh_uq5PX5C0g/view?usp=sharing

Basically the problem is that, when I enter in this flight mode, the drone usually speeds up vertically very fast without showing any sign that will stop soon. Sometimes the behaviour is the inverse: it goes down until reaching the ground and then "bounces" a bit. One possible explanation that I thought is that it "believes" the altitude target is much higher than its actual altitude, so it tries to go up very fast to reach it. So maybe, just in the moment in which I enter in altitude mode, the barometer was reading a peak. But I also have tried to read the barometer scope while flying (with OPlink) and there aren't any "high peaks" at the moment in which I enter altitude mode, so I can't explain this behaviour. (this strange behaviour doesn't start always from the very first moment in which I enter altitude hold, sometimes it lasts some seconds before it goes up).

I also tried to grab the drone and then enter in altitude hold. Again, the drone starts pushing very strongly. Then, I put it higher, but it doesn't decrease its thrust. However, with the motors turned off, the altitude scope shows (I think well) the altitude change when I rise it 1 or 2 meters from ground. Theoretically, while doing this kind of test, should the drone increase its throttle when I put it below the target altitude and decrease it when I put the drone above that altitude?

I also tried to change the altitude PIDs, but I don't think this'll be the solution since with the same setup, the other Revo board was flying well. Can it be a faulty barometer? (But the scope seems great, very similar to the previous board). With the "Velocity Proportional" and "Velocity Integral" set to their min, I haven't seen this behaviour in a few tests that I've done. But I think that it will be like having the altitude hold disabled, right?

If my setup helps, here it is:
- 250 frame
- Revo board (with its barometer well covered by foam)
- Motors EMAX 2204 2300kv
- Simonk 12A ESC
- Battery: 3S, 25C, 1300mhA
- UBLOX M8N
Total weight: 580 grams

Thanks!

gon

  • *
  • 30
Re: Problems with Altitude Hold and barometer
« Reply #1 on: May 13, 2017, 04:03:28 pm »
PS: In the video, I enter in altitude hold twice. It's just then when the drone starts pushing violently up. (This behaviour is the same outside)

Re: Problems with Altitude Hold and barometer
« Reply #2 on: May 13, 2017, 08:07:40 pm »
A little info to help you troubleshoot:

You must have a fairly good piece of open cell foam covering and strapped down on top of the baro (tiny metal rectangle with two tiny holes).  This foam must keep light from touching the baro too as that can cause altitude changes, but light does not sound like your problem.

A very common problem that is not completely fixed by foam is when a prop blows on the baro and makes the pressure higher.  The sensor says it reads high pressure which makes it think the altitude is too low, so it adds power, and that blows even harder and makes it climb even more (etc.).

The solution is to move the FC out of the wind blast or put up a barrier to keep wind from blowing on it.  For a test:  Maybe get a couple 5cm pieces of cardboard tube and slit down one side to make a C when looking at the end.  Put one on the FC like a chimney.  Maybe add another to cover the slit gap.  Test fly and see if it is any better.

gon

  • *
  • 30
Re: Problems with Altitude Hold and barometer
« Reply #3 on: May 14, 2017, 12:38:51 am »
Wow yes!! I solved it adding more foam and covering the baro better!

It's working quite well now! Thanks so much to both of you!

It's still climbing slowly. After 20 seconds in position hold, the drone is about 1-2 meters above of its initial altitude, but it's not as bad as before. (there's no comparison to before). Do you know any way to avoid that "long term deviation"?

Re: Problems with Altitude Hold and barometer
« Reply #4 on: May 14, 2017, 05:17:26 am »
Thermal calibration.  :)  Attitude -> Calibrations -> Thermal Calibration

Do the Gyro Calibration again after doing the Thermal Calibration.

Mateusz

  • *
  • 808
Re: Problems with Altitude Hold and barometer
« Reply #5 on: May 14, 2017, 08:27:13 am »
Wow yes!! I solved it adding more foam and covering the baro better!

Too much foam is also not good, you don't want to block baro. Check scopes using oplink (usb connector is very fragile better to use oplink) when you rise copter or lower it down scopes should show altitude change.

Thermal calibration.  :)  Attitude -> Calibrations -> Thermal Calibration

When you do temperature calibration, keep in mind that it will do it for two sensors at once Gyro and Baro. Recall that Gyro is motion sensor so you can't move board once you start temperature calibration. Baro is light sensitive (see here ), and there is a status led blinking on the board probably, also baro will be sensitive to pressure changes (air movement). What I did
  • Put Revo in a case with foam over bar, to protect it from status LED blinking.
  • Connect long USB cable and put Revo in plastic bag, then seal bag with rubber band around USB cable to prevent water condensation on electronics when cooling down.
  • Put sealed Revo in freezer for ~20min.
  • Take it out and fast put it in black opaque laptop case, so it won't see any additional light.
  • Connect USB and start Temp calibration, let calibration finish ~50-60min (don't interrupt earlier) and don't touch move, walk nearby.

Export UAV file with settings and delete everything within  <settings> except for
Code: [Select]
<object id="0x1262B2D0" name="AccelGyroSettings">
....
</object>
<object id="0xC456EB9A" name="RevoSettings">
....
</object>
Save this file as "Temperature-Calibration-Date-Revo.uav" and keep it save. Whenever you upgrade firmware or start from scratch, you can just import this file, it will show that it contains only two UAV objects which hold temp calibration, import these two objects and proceed with other steps.

When you engage altitude-hold it might jump a bit, but should stay at that altitude. If your altitude PIDs are off, it might oscillate up and down, climb too high or may return to correct altitude very slow if you pull it down (for example by a string). I had mine oscillating but than tuning down one parameter helped and it works perfect.