mak24

  • **
  • 55
My Barometer Reading
« on: April 30, 2017, 07:00:25 am »
I read TheOthercliff's wonderful post https://forum.librepilot.org/index.php?topic=311.0 and tried to check my Barometer as I am trying to troubleshoot Stability issues when flying in GPS mode.  Please pardon my noobness but I am having a bit of a tough time reading the Barometer Scope.

Is it correct that I need to click on BaroSensor.Altitude(m) and BaroSensor.Temperature(C) to get the BaroSensor.Pressure(Pa) reading.  If so then please see the attached and advise whether I am seeing the BaroSensor pressure and Altitude correctly.  Also, it seems that my Baro is bad.  Kindly confirm.

I did these reading using OPlink, battery connected to FC.

My Build
Clone 450
Emax 25 Amp ESC
2212 Stock Motors
Revo FC
GCS 16.09 Rhino


mak24

My Quad Build
Alien 450
Emax 25 Amp ESC
2212 980 KV SunnySky motor
10*4.5 APC Props
Revo FC
GCS 16.09 Rhino

Re: My Barometer Reading
« Reply #1 on: April 30, 2017, 08:48:01 am »
You can use the pressure variation, but I only remember the good value for the altitude variation.
After measuring several good baros, I came the conclusion that if it varies less than a meter (+-0.5m) then it is OK.

Yours measures +-0.4m so it is OK.  :)

Since you are testing the baro, are you having only vertical stability issues?  If you have a green GPS, then what is left is that vertical stability issues are usually caused by prop blast on the baro.  Baro needs to be covered with a thin layer of open cell foam that is held in place well.

Too little foam and you can get sudden large changes in altitude.  (e.g. prop blast makes it think it is too low and needs to climb and the extra power of climbing makes it think that it is even lower so it tries to climb even harder, repeat).

Too much foam and you get a slow (10 seconds or more) vertical oscillation.

Light on the baro will also make it change by several meters.  You can be hovering and just yaw around and the sun hits the baro and it will change as much as several meters.

Authentic DJI GPS's have extra filtering that slows their response (some clones don't have this issue), and that causes an east west oscillation, but there is often a vertical component too.

mak24

  • **
  • 55
Re: My Barometer Reading
« Reply #2 on: May 01, 2017, 06:00:38 am »
Hi TheOtherCliff:

Thanks kindly for the prompt response and confirmation of my barometer's proper functionality.

My quad flew perfectly in Complimentary mode.  GPS mode caused extreme forward and lateral drift (my Complimentary mode was more solid).  Although there was no significant upward, drift, I just wanted to leave no stone un-turned.

My GPS is a DJI clone, as you recommended.

https://www.banggood.com/Ublox-M8N-GPS-Compatible-with-DJI-NAZA-Lite-V1-V2-Flight-Controller-Phantom-1-2-Vision-p-991718.html?rmmds=myorder


After reading 90% of the General Discussion forum and a number of Autnomous Flying posts, I realized that I needed to do a number of basic things for GPS to work.  My GPS was always green and I had 10-13 sats .  The only issue was onboard and auxmag not aligning on the three axes - when stationary the axes aligned, upon moving the quad the axes deviated by upto +3 to -3.  My cabling was all twisted.  But I never calibrated both the onboard and auxmag GPSs, only the auxmag.  (Will performing this as the last step of the mag calibration work? )

I will start a new discussion/blog in this forum as an homage to all the developers who have developed such a great platform and are providing world class support to us newbies.  Hopefully, my blog will get a new enthusiast on the right foot.  As always I would welcome all the invaluable input from you and all other active contributors.

Thoughts?

Stay well
mak24

My Quad Build
Alien 450
Emax 25 Amp ESC
2212 980 KV SunnySky motor
10*4.5 APC Props
Revo FC
GCS 16.09 Rhino

Re: My Barometer Reading
« Reply #3 on: May 01, 2017, 10:45:09 pm »
That 3 degrees or so is normal difference between aux mag and onboard mag.

Our firmware uses the full capability of the mag, that means full 3D, not just compass heading.  That means the mag actually supplies some information about what direction is level.

Mag field varies over the earth, depending on many things, such as how much iron is in a mountain.  You can't know these deviations without measuring them.  This means that if your attitude mode quad hovers without drift in Basic attitude algorithm, that it will drift if you switch it into INS13.

The simple thing is to adjust Rotate Virtual in the Attitude tab (again) to get it hovering level again.  The problem with doing this is that if you switch back to Basic, it will be wrong again.  If you think you might go back to Basic some time, you can use the following procedure to get them both calibrated at the same time.  Search for the section titled Fine Tuning Your Hover To Stop Drift (Not Required).
https://librepilot.atlassian.net/wiki/display/LPDOC/Aux+Mag+Setup+and+Calibration

On top of that issue, if you didn't minimize the mag fields coming from your high current wires well enough (twisting and location), it can get much worse when flight power distorts mag fields more than just a few degrees.

mak24

  • **
  • 55
Re: My Barometer Reading
« Reply #4 on: May 02, 2017, 05:26:43 am »
Thanks for the prompt response TheOtherCliff! :D :D

I have disassembled my Quad already to make significant adjustments.  (The lateral drift in GPS mode is actually so significant that I crashed my Quad once in that mode, felt like it was going to fly so I zeroed the throttle).  The adjustments are as below

1.  I found that  the ESC wires to FC and motors wires were not twisted properly. 
2.  To further reduce the Electromagnetic Field (EMF) radius from the PDB, which is essentially the whole bottom plate of the quad, i will be replacing the plate with a smaller PDB. (I read in one of LibrePilot forums that larger the PDB, the greater the size of the spherical EMF around the PDB)
3.  Also, the post for the GPS has metallic plate where the GPS sits.  I thought I would make disk shaped barrier between the plate and the GPS (perhaps cork).  Good Idea?
4.  Also, one of the ESCs was heating up, so will be replacing that as well.
5.  Thanks for the great tip below "Fine Tuning Your Hover To Stop Drift (Not Required)." Will definitely be doing that.
6.  Would it make sense to do AutoTune to optimize the PIDs before step 5?
7.  Also wil be replacing my stock motors with SunnySky 2212/980kvs/


Hoping to re-assemble the Quad this week.  It is raining for this and next week so may not be able to do Mag calibration outdoors and test flight until we have a clear day.

So my build will be

Clone 450
Emax 25 Amp ESC
2212 / 980 kv SunnySky
Revo FC
GCS 16.09 Rhino


Will share my findings soon.

Stay Well
mak24

My Quad Build
Alien 450
Emax 25 Amp ESC
2212 980 KV SunnySky motor
10*4.5 APC Props
Revo FC
GCS 16.09 Rhino

Re: My Barometer Reading
« Reply #5 on: May 02, 2017, 06:25:14 am »
2.  To further reduce the Electromagnetic Field (EMF) radius from the PDB, which is essentially the whole bottom plate of the quad, i will be replacing the plate with a smaller PDB. (I read in one of LibrePilot forums that larger the PDB, the greater the size of the spherical EMF around the PDB)
The design of the PDB is a huge factor too.  Some were designed with mags in mind and some were not.  Generally the style that has + on the whole top side and - on the whole bottom side are good (or - and +, the key is that it is mostly the whole surface).

3.  Also, the post for the GPS has metallic plate where the GPS sits.  I thought I would make disk shaped barrier between the plate and the GPS (perhaps cork).  Good Idea?
Not necessary or even helpful.  :)

4.  Also, one of the ESCs was heating up, so will be replacing that as well.
If you have all ESC's BEC (red wire) plugged in the the FC then this is normal.  Manufacturing tolerances have one ESC BEC putting out 5.1V and the others putting out less, so the 5.1V one is doing all the work.  If it gets warm without even running the motors and letting it sit idle for 10 minutes, this is what you are seeing.

6.  Would it make sense to do AutoTune to optimize the PIDs before step 5?
PIDs don't affect the levelness of the hover so you can do it whenever you like.  :)