Re: Setting up for first flight.
« Reply #15 on: May 14, 2019, 07:03:09 pm »
I'm trying to gauge how badly tilted it is when it is in the air and if that tilt matches what you see in the GCS.  Even a small amount of tilt will make it accelerate and get fairly fast after several seconds and might be all it takes for a beginner to see it flying away very fast.  Just a half a degree (invisible to a human) is the difference between it slowly drifting left and slowly drifting right.

For your Flight Mode Switch, you should be using Stabilzed-1 which is Atti, Atti, Axislock, Manual.  And (besides required Input and Output and RC setup) pretty much defaults for everything else.  I recommend using the default settings, and not one of the templates which can have issues like "zero the integral" and might sound like they match your aircraft but they don't.

This is probably not your problem but be aware that balanced props are important because too much vibration will affect the sensors and make it fly sideways.

It's best to start on grass with bigger and bigger throttle blips (longer blips, not quick jabs) until you know how much throttle it takes to get it up to knee high.  By this time you should be able to tell which way it is consistently drifting.  For now, it's OK to use transmitter trims to correct for this till it no longer drifts.  After trimming it out this way, it should stay within a meter (yard) or two for say 10 seconds as long as there is no wind.  Trim it till you can't predict whether it will drift left or right.  It's very important for a beginner to have a trimmed aircraft.

After you get it flying this way, and before you start using other flight modes like Rate or VelocityRoam (VR is a GPS mode) you must put the trims back in the center (where they were when you ran setup) and fix this drift the correct way.  GCS Attitude(->Settings)->RotateVirtual... is where you do this.  If it is drifting forward you subtract from pitch.  If it is drifting left you subtract from roll.

Re: Setting up for first flight.
« Reply #16 on: May 15, 2019, 02:57:58 am »
This is a pic of GCS when it is absolutely level.

As you can see it is OK front to back (pitch?) not so much side to side (roll?) with right side down.  It tries to fly this way as well.  When I have the throttle low enough to spin the blades but not high enough to take off it tries to compensate and the right side speeds up - causing a flip.  If I manually compensate I can keep it from flipping but something is clearly wrong here!

Also I noticed not all of the props spin up at the same time.  I usually have at least one that won't spin but rather just twitches back and forth until I give it more throttle but by then it wants to flip on that side.
« Last Edit: May 15, 2019, 03:03:39 am by Stardaddyed »

Re: Setting up for first flight.
« Reply #17 on: May 15, 2019, 05:49:37 pm »
That amount of tilt would definitely make it accelerate away quickly.

- FC must be mounted level :)
- Both Accel and Board level calibrations must be done correctly and well
- Attitude->Settings->RotateVirtual should be 0, 0, 0
- Since you have Attitude->Settings->AttiEstAlo set to INS13, your mag must also be mounted far away from magnetic field sources and well calibrated.  Also your Home Location should be reasonably accurate.  Also there are issues with certain areas of the globe having mag field deviations.

Info:  I find it common to get a little bit of bank in the Attitude (that must be configured out) when using INS13.  It is apparently because of the mag sensor alignment.  Also, the earth's mag field has moved differently than was predicted 10 years ago, so the 16.09 algorithm is less accurate than it should have been.  This can be adjusted for in Attitude->Settings->RotateVirtual or even in Attitude->Magnetometer->AuxMagOrientation.  Are you using an aux mag?  The earth mag field issue has been corrected (the latest algorithm used) in the unreleased but widely used version called "next" if you would care to upgrade.  For 16.09, I prefer to adjust AuxMagOrientation (if it is a mag alignment / earth mag field issue) as discussed here:

https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/18382863/Aux+Mag+Setup+and+Calibration
in the section titled "Fine Tuning Your Hover To Stop Drift (Not Required)"


I suggest that you recalibrate / reset the things in the list above.  If it is still tilted badly (say more than 5 degrees (one notch) in GCS Flight display), then I suggest that you change AttiEstAlgo from INS13 back to Basic (for a test anyway).  You will have to remove all GPS flight modes from your FlightModeSwitch too.

Re: Setting up for first flight.
« Reply #18 on: May 15, 2019, 09:50:34 pm »
Thanks for the response as usual.  Geez you know a ton!

Quote
Since you have Attitude->Settings->AttiEstAlo set to INS13, your mag must also be mounted far away from magnetic field sources and well calibrated.  Also your Home Location should be reasonably accurate.  Also there are issues with certain areas of the globe having mag field deviations.

How far away is far away?  I have the FC mounted in the middle of the craft (Readytosky S500 Quadcopter Frame). The receiver is on the front lip of the lower shelf and the GPS is on the back lip.  The FCis mounted with plastic bolts through the housing to the top of the top shelf directly over the PD/BEC board (a HOBBYMATE XT60).

Re: Setting up for first flight.
« Reply #19 on: May 16, 2019, 01:36:19 am »
How strong is the magnet?  :)

What GPS are you using?  I hope it has a mag sensor.  It is best to:
- use a mag sensor that is part of a GPS
- mount the GPS up on a pole
- change your settings to use ONLY the aux mag (not onboard or both)

There are other things you should do like twisting all your high current cables.  Generally, if you twist all your high current motor cables (battery to connector, connector to PDB, PDB to ESC, ESC to motor) then the aux mag inside a GPS up on a standard say 150mm pole is far enough away, considering that it is more than 150mm total distance from the sensor.  I'm going to say at very least 200mm total.  Smaller quads that use less current can get away with shorter distance between mag sensor and high current cables.  Of course you won't see any mag problems from the wiring until you fly at high power.

The standard 1-8S Lipo alarm has tiny real speakers with magnets.  About the same distance is OK for them.  Some airplane hatch hold down magnets that came in some of my airplanes need to be farther than that, at 250-300mm I can no longer see a difference in the mag scope.  With FC or GPS/mag stationary and watching the GCS mag scope or sensor numeric outputs, bring your magnetic part close to find out how close you can see any tiny disturbance and make it farther than that.  For mag fields around wiring, it has to be under highest current flight load (props on at full RPM) to generate max mag field so bench measurement is often not possible.

Re: Setting up for first flight.
« Reply #20 on: May 16, 2019, 03:23:38 am »
I GOT IT OFF THE GROUND!  Hopped it up a couple of times and it held mostly stable. 

I could correct the roll in INS13 if I used a 6 - 8 correction. So I switched to basic and there was no correction needed.  I noticed that in that mode it was stable when it was just sitting on the ground. In the INS13 it would be tilted but also very unstable.  I moved it to "Complementary + Mag+ GPSOutdoor" and again no tilt and stable.  I decided to give it a go and up she went. She wondered around a little but it was easy to correct with slight movements of the stick. Again the problem for me is that it is either going up or going down.  I set it down and tried it again.  Up she when and I just corrected for the little drift if she got out of hand.  "Set" it back down. 

I am sure I should be using the algorithm but it worked.  Also I am using a "Geekstory BN-880 GPS Module U8 with Flash HMC5883 Compass + GPS Active Antenna" Post is on the way.

Re: Setting up for first flight.
« Reply #21 on: May 16, 2019, 05:31:11 am »
Do you actually have the aux mag connected and configured?  That style of mag is exactly what is described in the wiki article I linked to.  It requires another cable (besides the GPS cable) to be connected to FlexiPort.  It requires Attitude->Mag->AuxMagOrientation to be either 0,180,0 or 180,0,180.  Also any aux mag requires you to set Atti->Mag->MagUsage to be either AuxOnly (preferred) or Both (not preferred).  If you are missing even one of the requirements, then you are using the OnBoard mag only which can actually work for big quads (say 450 or larger) if your high current cables are properly twisted.

Some GPSs even claim to have a mag, but have an empty place on the circuit board instead.

Now days, for future purchases, I recommend buying a DJI/Naza GPS/mag which puts both signals (GPS and mag) on one cable, so it frees up a port.  Also, there can be problems with the I2C signal of your style of GPS/mag that sometimes needs adding pull up resistors to get it to work well.  I generally buy OCDay brand Naza GPS for about $23 shipped on eBay.
https://www.ebay.com/itm/OCDAY-NEO-M8N-GPS-Sensitive-for-DJI-NAZA-Lite-V1-V2-Flight-Controller-RC783/312537851509

GPS Navigation (INS13) is really what you want for 16.09 AttiEstAlgo to use GPS flight modes.  You are OK to use something else for non-GPS flight modes though.

My estimate of 5 degrees is what I have found for my FCs in my place on earth when I did setups a year and more ago.  If I had recalibrated everything and it still was 6-8 I would correct it in RotateVirtual (for me, preferably in AuxMagOrientation because then you can use the same 0,0,0 RotateVirtual for both Basic and INS13 (or some small numbers that satisfy Basic) without changing RotateVirtual since Basic doesn't use mag, see the wiki article).

Mag fields can be a bit strange inside a house or on the ground or close to your metal car, etc.  The GCS horizon does jiggle a bit when you think it shouldn't when using INS13, but it works fine.

Quote
Again the problem for me is that it is either going up or going down.
Learning More:
- Learn to control aLtitude first.  Don't touch the other controls.
- After several trim adjustments it will stay in one place better and give you more time to practice holding your aLtitude reasonably.

Re: Setting up for first flight.
« Reply #22 on: May 20, 2019, 07:14:29 pm »
Over the weekend I hooked up the mag using the Flexiport and I2C.  It works but I haven't had a chance to Calibrate and test.  The wind hear was blowing at 20 mph so I didn't think that would work.  :o 

How do I know which AuxMagOrientation I have it at?  It is on my GPS that is now on a pole.  Also, I saw somewhere that said the antenna side (not the PCB side) should point up.  If I do that I cannot see the LEDs.  Is this an issue?  Will the calibration procedure take care of both mags?

I still don't understand the trim comment.  The throttle goes from 0% to 100%.  100% makes it go up, fast.  0% makes the motors shut off.  25% makes the quad go up but not as fast, so somewhere between 0 and 25 will hover.  Will I have to find the sweet spot every time I want it to hover?  How can that be possible if I can't see the quad?   Can I define that 50% is hover with 100% up max and 0% off?


Ed

Re: Setting up for first flight.
« Reply #23 on: May 20, 2019, 09:17:39 pm »
How do I know which AuxMagOrientation I have it at?
Generally, any GPS that has a mag built in will have an arrow that points forward.  With that, OpenPilot Platinum, and DJI Naza GPS/mag use 0,0,0 mag orientation setup.  Others have an I2C aux mag that must be set 0,180,0 or 180,0,180.

I saw somewhere that said the antenna side (not the PCB side) should point up.  If I do that I cannot see the LEDs.  Is this an issue?
That's right (ceramic antenna up).  The square ceramic antenna is mounted facing the sky.  There are LEDs on the FC that tell you more than GPS LEDs.  To arm (besides setup), the default is that you must have 7 or more sats, the GPS PDOP must be a good value, and the mag must be green.

Will the calibration procedure take care of both mags?
Yes, but generally an aux/external mag is more accurate than the onboard mag, so I don't let it dilute the good external readings with less accurate onboard readings.

I still don't understand the trim comment.  The throttle goes from 0% to 100%.  100% makes it go up, fast.  0% makes the motors shut off.  25% makes the quad go up but not as fast, so somewhere between 0 and 25 will hover.
All of the non-switch arming settings use zero throttle and another flight control too.  If you trim the throttle so that low stick doesn't go to zero throttle, then you won't be able to arm.  Likewise if you trim e.g. yaw, it won't see full yaw in one direction and if that is your arming direction, it won't arm.  Throttle must really be zero, but as I recall, the other channel doesn't have to be 100%.  It is less than 100%, so it would need a lot of trim or dual rates on low rate to keep from arming.

Will I have to find the sweet spot every time I want it to hover?  How can that be possible if I can't see the quad?   Can I define that 50% is hover with 100% up max and 0% off?
With Manual thrust mode you can't maintain an exact altitude without seeing it.  Even the difference between fully charged battery and lower battery changes the hover throttle stick position.  There are thrust modes that use the barometer to maintain altitude.  AltitudeHold does the obvious thing, except that zero throttle stops the motors (a safety feature).  AltitudeVario has 50% throttle doing AltitudeHold (it has hysteresis, so it's actually 40% to 60% stick).  AV has 100% throttle stick doing a slow (baro controlled) climb, and 1% throttle doing a slow descent.  0% stops the motors.

Take off in Manual thrust mode and switch to AV in the air.  I wouldn't bother with AH.

25% throttle hover? !!!  That is either a very powerful quad, or it is mis-propped, mis-calibrated, or mis-configured?
« Last Edit: May 20, 2019, 09:21:40 pm by TheOtherCliff »

Re: Setting up for first flight.
« Reply #24 on: May 21, 2019, 05:29:42 pm »
It was designed to carry a gimbal and camera which are not installed yet.  This makes the quad really light for now.  I also designed it with a larger battery then I am testing with so that also adds to the weight issue.

Testing last night yielded better results.  I calibrated the mags again and Aux mag showed up and it is reading. I switch the system over to Aux only and it looks really good on the flight display, level in x and y directions.  It looks close on the compass heading but I did not check it precisely.  I will tonight and make sure I have the orientation.  My particular GPS does not have an arrow indicating forward but clones/originals do so will use that.  I assume it should point to the front and be level.

I got it off the ground in the basic GPS mode and it would reasonably hover but was drifting quite a bit.  When I switched it to IN13 it wants to tip on lift off.  It does this even if I try to hop it up.  The more power to the hop the faster it tips.  I keep reviewing the Fix a flip and start up list. 

Re: Setting up for first flight.
« Reply #25 on: May 21, 2019, 07:56:46 pm »
I recommend that you set transmitter trims back to the center (where you had them when you ran transmitter setup) (and leave them there) and adjust some settings until it shows level in GCS "Flight Data" to get it safer to fly before flying it.  You could adjust Attitude->Settings->RotateVirtual..., but if you get it level in INS13 (AttiEstAlgo) then it will fly off the other way in Basic.  :(

INS13 uses mag for compass heading AND FOR LEVELING.  Basic does not use the mag at all.  The problem is with the mag sensor alignment and world magnetic model causing INS13 to be a little out of level.  The following tells you how to adjust Attitude->Magnetometer->AuxMagOrientation so that your perfect Basic stays perfect because you adjust the mag orientation compensation angles to get INS13 hovering right.  First, in Basic AttiEstAlgo / Attitude flight mode, you get it to hover without drifting by adjusting RotateVirtual, then in INS13 AttiEstAlgo / Attitude flight mode you get it to hover without drift by adjusting AuxMagOrientation.  Be aware that Attitude->Magnetometer->MagUsage needs to be set to AuxOnly.

https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/18382863/Aux+Mag+Setup+and+Calibration
in the section titled "Fine Tuning Your Hover To Stop Drift (Not Required)"
« Last Edit: May 21, 2019, 08:02:22 pm by TheOtherCliff »

Re: Setting up for first flight.
« Reply #26 on: May 28, 2019, 10:32:11 pm »
I was so close! 

Over the holiday weekend I had a bunch to do around the house but finally got the drone out last night.  Got it up in the air and was able to control its height OK.  I had read the article on auto-tuning and got that going and it worked.  Took about a minute for the quad to stop shacking but then is actuall stayed were I left it, at least horizontally.  Then I managed to land it without crashing it.  I was stoked!

Decided to take off and got it up to about 10 feet when all of a sudden it looked like it blew apart and fell like a rock.  I thing what happened is that I lost a propeller nuts and then threw a prop.  Didn't find the nut but found the prop un-broken. The drone fell straight down on the arm without a prop and broke the motor mount off.  Crap.  The problem is that darn things are only available from China or Hong Kong.  I may have to cluge something together. 

There was that one shining moment in the sun....

Question?  where is the setting to limit the amount of tilt the vehicle can go?  I couldn't find it.  Also is there a description of all the setting on the configuration tab?

Ed

Re: Setting up for first flight.
« Reply #27 on: May 28, 2019, 11:02:02 pm »
The drone fell straight down on the arm without a prop and broke the motor mount off.  Crap.  The problem is that darn things are only available from China or Hong Kong.  I may have to cluge something together. 
I have successfully used super glue.  First remove the motor and other things in the area.  Glue it and let it dry thoroughly.  Kicker makes it dry faster if you have some.  Then use super glue to glue some popsicle stick pieces as splints across the crack in a way that doesn't interfere with anything (like bolting the motor back on).  Or even better, use some fibreglass cloth with super glue (it's tricky though).  The repair is not as strong as the original, but it is strong enough to fly if you don't land too hard.  I would let it dry overnight before flying it.

Balance all your props!  That may be why it came apart in the first place, and smooth props are definitely less stress on the weakened frame.

Question?  where is the setting to limit the amount of tilt the vehicle can go?  I couldn't find it.  Also is there a description of all the setting on the configuration tab?
On the Stabilization page, there is a slider called Attitude and the default value is 55 (degrees for max bank angle when using full stick).  This value is only used in Attitude mode.
« Last Edit: May 29, 2019, 01:06:27 am by TheOtherCliff »

Re: Setting up for first flight.
« Reply #28 on: August 06, 2019, 09:58:18 pm »
Haven't updated in a long time so I thought I should.

The drone has lifted off the ground!  Enough that I was able to do the autotune and this has helped.  I also converted the throttle to auto-centering.

There is significant drift that I have worked on, and it is better.  The thing is when it goes bad, it goes bad FAST and HARD!  When in the rate mode what is a conservative max bank angle.  I am inclined to put in 1 but that may be a little low  ::)  maybe 5-10 to start with?

I redid my calculations on the design and without the weight of the camera equipment the drone is seriously over powered.  I need to add about 300g of extra weigh to put it in line with the design. I have to figure out how to do that without using the expensive camera and gimble.  I also had a 5500mAh battery and I am actually using a 2500mAh, the weight difference is significant.  The result is that the power to weight ratio is pegged.  I assume this makes the a little touchy, hence the going bad fast behavior. 

Ed

Re: Setting up for first flight.
« Reply #29 on: August 07, 2019, 05:55:47 am »
I also converted the throttle to auto-centering.
Personally, I think that may be more hassle and danger than it is worth.  FYI: All aLtitude helping modes (e.g. ALtitude Hold, ALtitude Vario, VelocityRoam, etc.) have a 20% deadband (+-10%) in the middle of the throttle stick so it is not hard to get it to stay at a fixed altitude, and when you are in that deadband it will not (should not) move (up or down) and doesn't need any kind of trimming.  It is as if you are using ALtitude Hold; the code is the same.  On the other hand, you must have low throttle for arming, and simply releasing the stick could cause it to go to half power, which you already say is very powerful.....

I would use a normal throttle (no spring) and get it flying and working well in ATitude mode with Manual thrust mode before advancing to any of the ALtitude Hold (baro helper) type of thrust modes.  It's hard to debug a fancy flight mode when you don't even know if the basic functions it relies on are working...

When in the rate mode what is a conservative max bank angle.  I am inclined to put in 1 but that may be a little low  ::)  maybe 5-10 to start with?
Rate mode is not self leveling.  It is entirely about roll rate.  The bank angle stays what it was when you centered the stick.  That can be banked 90 degrees or completely upside down.  ATtitude mode is self leveling.  The default max angle (Stabilization -> ATtitude) for that is 55 (degrees).  You can certainly reduce that, but be aware that you are reducing your braking then too.  I don't believe it is really necessary to reduce it for a beginner, it's not hard to learn to avoid slamming the sticks.  :)

Is it possible that you were expecting Rate mode to automatically level it out for you?  Is that your main problem?

I redid my calculations on the design and without the weight of the camera equipment the drone is seriously over powered.  I need to add about 300g of extra weigh to put it in line with the design. ... The result is that the power to weight ratio is pegged.  I assume this makes the a little touchy, hence the going bad fast behavior. 
Removing weight will not destabilize the PIDs.  Adding weight above where it was when you tuned it will a little.  You may see a little oscillation.  I have never seen it too bad in this case.  A wobbly mounted camera or battery can also cause oscillations.  These can be a bit worse.  The fix for a wobbly camera gimbal may be to reduce the PIDs a bit.  It will fly mushy a bit, but it won't oscillate.

Could you describe or link a video to show what it does when it "goes bad"?  I can tell you that vibration is a bad enemy.  Balance your props.  Make sure (somehow) that it doesn't vibrate at any throttle setting (especially at any high power level).  Vibration makes both the gyros and accels go crazy.  Both of these can cause it to go very unlevel anywhere from quickly to slowly.

There is an issue that I call invisible oscillations (D-term oscillations).  You don't see them because they are very small and very fast, but what happens is that the commands go from (say) full left roll to full right roll many times a second, but the result is that it is level.  The piece you see, especially with a high powered quad, is caused because you are only asking for say 20% power and to give full left you get 100% in the right motors and 0% in the left motors (50% average power), then it quickly switches to 100% left and 0% right.  What you get is an average of 50% on all motors as soon as you add any power.  If 50% power makes it climb like a rocket, then what you get is that it climbs like a rocket any time you go above zero throttle.  The fix is to remove all D term in your PIDs.  Generally you want to reduce P and I a bit (times .75 say?) then too.  If you have AutoTune set up, you can just set Settings->SystemIdentSettings->DerivativeFactor to 0 and press the red up arrow to Save, then re-export (no need to fly tuning flight again) your AT based PIDs and it will do this for you.  To re-export, you just switch your Flight Mode Switch into AT and back out to some other mode, quickly, three times (six clicks) (doesn't have to be armed).  Thus you must of course have AT on your FMS.  :)  And you must reboot the FC after putting AT on the FMS for AT to initialize correctly.  You must power the quad with a flight battery for the RC receiver to get power to see the transmitter FMS.  It is best to check the PIDs before and after to make sure they change. or you can watch it happen with GCS connected to FC with USB.
« Last Edit: August 07, 2019, 08:27:58 am by TheOtherCliff »