LibrePilot Forum

Users => Vehicles - MultiRotors => Topic started by: glenneaux on January 01, 2019, 09:35:40 am

Title: next steps to optimizing multirotor setup
Post by: glenneaux on January 01, 2019, 09:35:40 am
Hi everyone

I'm a long time OP guy but new in the sense I've had CC3D and revos for years and never really gotten around to using them !

I've got a multirotor setup now, it's a TBS Discovery 4S setup, running genuine OP Revo, with OP GPS (no aux may) using OPLink for control and telemetry and a minimOSD.

Currently it all works and flies but I haven't played with PIDs and it flies pretty sloppily, but I've flown helis in rate mode so I'm used to constant small inputs.

Is there an order I should be working through the INS modes to get it flying well ? Autotune ?

The OP non aux mav GPS, should I be giving this the flick and using my DJI GPS ? Have read there is a smoothing issue, do I need some altered firmware or move to next ? Or do I get a different GPS module?  Currently it flies with constant orange MAG status.

Do I need to go through and tidy up my wiring, twisting ESC wiring ??
Title: Re: next steps to optimizing multirotor setup
Post by: glenneaux on January 01, 2019, 11:40:40 am
Hi Guys

Since we spoke last I read up more on Autotune.

I have put the quad into simple Complementary mode and ran through autotune as described on the wiki.

Seemed to work successfully, managed to get updated PID values.

These have been set, I have then disabled Autotune and set my flightmodestas back to normal.

Now for some reason whenever I arm and throttle up the motors dont start and then the cpu reboots (see scopes screen)

Any ideas?

Title: Re: next steps to optimizing multirotor setup
Post by: TheOtherCliff on January 01, 2019, 06:10:15 pm
with OP GPS (no aux mag)
The OP non aux mag GPS, should I be giving this the flick and using my DJI GPS ?
Of course mag is only needed for INS13, not Basic.
It is possible to fly large quads using the on board mag.  I have one set up and flying for a friend with a 500mm quad.  All high current cables (battery, battery to PDB, PDB to ESC, and ESC to motor) must be very carefully twisted.  Also there are some PDBs that are not good and act like untwisted cables.

Currently it flies with constant orange MAG status.
Do I need to go through and tidy up my wiring, twisting ESC wiring ??
Is mag status green when motors are stopped and change to orange when flying?  If yes, then your cables are not twisted and routed well enough.  If no (if it is always orange) then your mag calibration needs to be done again and more carefully.  Do it outdoors, away from metal, do not set it on the ground once you start the calibration.

Now for some reason whenever I arm and throttle up the motors dont start and then the cpu reboots (see scopes screen)
Your PIDs look fine.  At least they should not cause reboot.  In Flight Mode Switch setttings, you could set all banks to #2 (stock PIDs) for a test.

Do you have a GPS flight mode configured, but still using Basic AttiEstAlgo?

Is HomeLocation set to something reasonable?  I sometimes fly with HomeLocation set 30miles/50km away and it flies OK (but GPS map is off by a couple hundred meters).

Do you have matching GCS and firmware versions?  They must match.
Title: Re: next steps to optimizing multirotor setup
Post by: glenneaux on January 02, 2019, 05:09:27 am
with OP GPS (no aux mag)
The OP non aux mag GPS, should I be giving this the flick and using my DJI GPS ?
Of course mag is only needed for INS13, not Basic.
It is possible to fly large quads using the on board mag.  I have one set up and flying for a friend with a 500mm quad.  All high current cables (battery, battery to PDB, PDB to ESC, and ESC to motor) must be very carefully twisted.  Also there are some PDBs that are not good and act like untwisted cables.

Currently it flies with constant orange MAG status.
Do I need to go through and tidy up my wiring, twisting ESC wiring ??
Is mag status green when motors are stopped and change to orange when flying?  If yes, then your cables are not twisted and routed well enough.  If no (if it is always orange) then your mag calibration needs to be done again and more carefully.  Do it outdoors, away from metal, do not set it on the ground once you start the calibration.

Now for some reason whenever I arm and throttle up the motors dont start and then the cpu reboots (see scopes screen)
Your PIDs look fine.  At least they should not cause reboot.  In Flight Mode Switch setttings, you could set all banks to #2 (stock PIDs) for a test.

Do you have a GPS flight mode configured, but still using Basic AttiEstAlgo?

Is HomeLocation set to something reasonable?  I sometimes fly with HomeLocation set 30miles/50km away and it flies OK (but GPS map is off by a couple hundred meters).

Do you have matching GCS and firmware versions?  They must match.

I will go back and clean up my wiring and try to twist all the wires.. may need to move esc's to top of the arms and neaten it all up.

Mag is currently green while off but orange when flying... haven't actually looked into this one too closely yet as i was only flying in Attitude mode, not yet using any GPS stuff so didn't really pay attention.


Now, in regards to this system reboot problem.
I have all 3 flight modes set to use Stabilised 1, have tried both banks and have confirmed no GPS assisted modes.

I have disabled GPS entirely and even when using basic complementary i still get a system reboot when i throttle up after arming.

I actually managed to get it to arm after reenabling GPS and settings INS13INDOOR but then after i took it outside i couldnt get it to arm again. This is with a good GPS fix with 11 sats in view.

my GCS and firmware are all matching, including with OPLINK in my radio.

Is there something maybe with the flight side logs that has got stuck and causing problems? After a few test flights i thought, oh having flight side logs thats interesting and enabled some functions on armed only.. i took it out and flew it and had CPU load warnings midflight and luckily didnt damage anything.. I since diasbled everything and made sure all flight side log settings were disabled/off.. This quad will happily ARM sitting on the ground and it's only when you throttle up that it reboots.

Maybe I need to erase all settings and start from scratch again?
Title: Re: next steps to optimizing multirotor setup
Post by: TheOtherCliff on January 02, 2019, 05:58:27 am
Very old / bad battery or props way too large or a motor / ESC conflict that causes loss of sync (sounds like you threw a stick into the prop) can all cause battery voltage sag.  A test you could make would be to remove props so motors run with very small load instead of full flight load.

Another thing is anything that draws power from 5V and using a low power BEC.  Servos for a gimbal for instance.

Do you have a LiPo alarm installed?  What is the battery voltage resting and again under full load?
Title: Re: next steps to optimizing multirotor setup
Post by: glenneaux on January 02, 2019, 07:17:06 am
No lipo alarm... I tested it just running off USB, exactly the same fault

Should I try changing from oneshot to pwm??

Batteries are good, this thing was flying no problem before I ran autotune

Sent from my Nexus 5 using Tapatalk

Title: Re: next steps to optimizing multirotor setup
Post by: f5soh on January 02, 2019, 12:49:55 pm
Is Autotune module completely disabled ?

- In HWSettings > OptionalModules
- Removed from flightmodes
Title: Re: next steps to optimizing multirotor setup
Post by: glenneaux on January 02, 2019, 12:56:17 pm
Is Autotune module completely disabled ?

- In HWSettings > OptionalModules
- Removed from flightmodes
Hi there yes have checked that already... Have then reconfigured for autotune and still.have reboots.

Sent from my Nexus 5 using Tapatalk

Title: Re: next steps to optimizing multirotor setup
Post by: f5soh on January 02, 2019, 12:59:12 pm
Post the config file where Autotune module is disabled and you see reboots.

File > Export UAVSettings

** Double check the +5V power using a voltmeter, while arming.
Title: Re: next steps to optimizing multirotor setup
Post by: glenneaux on January 02, 2019, 01:01:02 pm
see attached.

Title: Re: next steps to optimizing multirotor setup
Post by: f5soh on January 02, 2019, 02:14:29 pm
Attitude OuterLoop > Integral value is unexpected and will cause issues, set at least this one to zero

or setting the Attitude OuterLoop (PI) to defaults using the button.

(https://forum.librepilot.org/index.php?action=dlattach;topic=4520.0;attach=7978)
Title: Re: next steps to optimizing multirotor setup
Post by: glenneaux on January 02, 2019, 02:36:21 pm
Attitude OuterLoop > Integral value is unexpected and will cause issues, set at least this one to zero

or setting the Attitude OuterLoop (PI) to defaults using the button.

(https://forum.librepilot.org/index.php?action=dlattach;topic=4520.0;attach=7978)

Hello

Guess I probably should have reset PID settings once i had this issue after doing Autotune.. but fear of not wanting to do Autotune again made me not do that.

Have set Integral to 0 on all PID's and aircraft arms and motors throttle up.

This value has come from Autotune.. is that odd ?



edit: also since i have braided and twisted all the high current wires my Mag seems better. not sure if this is a good enough test but i held quad down and armed and throttled up a bit and watched the mag status and it stayed green... This might not be a good test, will need to take it out and fly it ? Need a bluetooth tx module for my taranis
Title: Re: next steps to optimizing multirotor setup
Post by: glenneaux on January 02, 2019, 02:48:23 pm
Also side note... These antennas supplied with revos, they are a dipole yes ? I should have the elements held inline with each other and vertical to the ground ?(https://uploads.tapatalk-cdn.com/20190102/d3db4367e2870c59fe29f041b227bea2.jpg)

Sent from my Nexus 5 using Tapatalk

Title: Re: next steps to optimizing multirotor setup
Post by: f5soh on January 02, 2019, 06:09:48 pm
Quote
Have set Integral to 0 on all PID's and aircraft arms and motors throttle up.
This value has come from Autotune.. is that odd ?

The outerloop Iterm will be set to 0, see tooltip.
Even if Autotune set one value, this will not cause a reboot.

The main cause is a StabSettings values very strange, look like a corrupted uavo.
Like AxisLockKp = 1200 and others....

Reload the attached file for StabSettings defaults to fix the reboot issue.


About antennas, best results are obtained using vertical polarisation in both sides.
Title: Re: next steps to optimizing multirotor setup
Post by: TheOtherCliff on January 02, 2019, 07:05:17 pm
In Flight Mode Switch setttings, you could set all banks to #2 (stock PIDs) for a test.

I suggested this so that you could test with default PIDs without erasing the AutoTune PIDs ... to see if it was AutoTune's fault.

Also, you can "re-export" the AutoTune PIDs from the stored tuning flight values by booting it with AutoTune configured into flight mode switch and toggling quickly from AT to other mode and back at least 3 times (6 clicks).  At least if you haven't changed the default AutoTune behavior...  This is SmoothQuick.  If you do this toggle with it disarmed, you get SmoothQuick=3, half way between smoothest (1) and quickest (5).  If you do it when armed and flying, it changes PID to next "Quicker" value (4) in mid flight.  Repeat and you get quickest. (5)  Repeat again and it wraps back to smoothest value (1).

===============

You antenna is a dipole one wire should go up (it does not matter which wire) and the other wire should go down.  The coax cable should come out horizontally to result in a shape like this:   |-----
Title: Re: next steps to optimizing multirotor setup
Post by: glenneaux on January 03, 2019, 03:59:09 am
Thanks guys I will have a look at those values not sure how that's happened... Will take a look at that file you supplied f5osh..

I'll have to have a play with the antenna, it's a bit of a pain the way the antenna is made up kinda difficult to get the wires to run out in a T like that... Or can I cut the heat shrink off if I have something to make it sturdy around the join ?

Sent from my Nexus 5 using Tapatalk

Title: Re: next steps to optimizing multirotor setup
Post by: TheOtherCliff on January 03, 2019, 07:07:53 am
The problem with those antennas is that you really need to put the floppy wires inside a single tube so they remain vertical in flight.  That tube should be plastic.  Even with plastic, it can slightly detune the antenna depending on what kind of plastic it is.  It would be best to do range tests with and without, on the same day and as nearly as possible, the exact same environment.

Better yet to replace the top wire with stiff wire and the bottom wire with something more flexible.  This gets into the velocity factors of various metals and dielectric effects from the wire insulation affecting correct the wire length ... and/or hand tuning when done.

Or look here for some reviews on what I have tested.
https://forum.librepilot.org/index.php?topic=4199.msg28510;topicseen#msg28510
Title: Re: next steps to optimizing multirotor setup
Post by: glenneaux on January 03, 2019, 12:24:24 pm
So I took this out today and had a good time.

Had green mag during heavy throttle inputs which is promising.. all ESC wiring is twisted / braided.

Tested position hold and velocityroam. Both worked well.

Position hold moves around a little bit... How steady does position hold hold the aircraft?

My board is mounted in free air out of the sun but not ideal in regards to the baro sensor. Not sure how kind of perturbations you get in the breeze ?

Another thing I haven't done is calibrated temperature drift ?

Position hold honestly wasn't that bad but I did notice that in velocityroam I was having random altitude drops.... It would drop about 4ft while moving side to side... It would recover altitude after... Not sure what to make of that.

My friend was with me with his phantom 4 pro so maybe I'm expecting a bit much :)
Title: Re: next steps to optimizing multirotor setup
Post by: TheOtherCliff on January 04, 2019, 07:56:01 pm
Position hold moves around a little bit... How steady does position hold hold the aircraft?
The longer you wait after power up and before takeoff, the more solidly the GPS will hold position.  It is a good idea to wait 12 minutes (almanac download) before the first flight of the day and 2 minutes or so for each new battery after that the same day.  Specs say that with correct warmup, it should usually be 1-2m very slow drift; not really noticeable except if you PH for a long time.  VR with neutral sticks is exactly PH.

My board is mounted in free air out of the sun but not ideal in regards to the baro sensor. Not sure how kind of perturbations you get in the breeze ?
Prop blast will hit the baro sensor.  Try hard yaw, hard roll bank, hard pitch bank and you may see more effect in some cases than others.  This is a thing that I have a hard time correcting sometimes.  On a quad with the FC on top I put the FC in a loosely sealed dome (clear food container).  On a quad with FC between two body plates I had to seal the edge all the way around.

Another thing I haven't done is calibrated temperature drift ?
Thermal calibration helps.  Without it, you will see a slow change in altitude of as much as 4 meters over the course of a flight as the FC warms up.

Position hold honestly wasn't that bad but I did notice that in velocityroam I was having random altitude drops.... It would drop about 4ft while moving side to side... It would recover altitude after... Not sure what to make of that.
Baro is sensitive to light.  It needs to be hidden from light.  Black, open cell foam helps for light (and somewhat for prop blast too).  This post has a picture of black open cell foam:
https://forum.librepilot.org/index.php?topic=1284.msg9388#msg9388

and wiki has pictures
https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/12058671/Altitude+Hold
Title: Re: next steps to optimizing multirotor setup
Post by: glenneaux on January 17, 2019, 01:06:39 pm
Hi guys

Still haven't covered my baro but had good flights today flying fpv

This was flying mostly attitude mode but also happily using velocityroam and position hold.


Cliff changed the links to point to youtube.com instead of youtu.be so they would be visible in the forum
https://www.youtube.com/watch?v=8_gqYDgXu1o


https://www.youtube.com/watch?v=Z6_Ur8YD1TY


My OSD isn't working at all, kvteam minimosd.. have had it working but never without problems... Have had video resets, currently only getting flickering osd data on the sides... Not sure what to do I am tempted to turf it all and start again
Title: Re: next steps to optimizing multirotor setup
Post by: TheOtherCliff on January 18, 2019, 05:10:24 pm
Similar problems with my OSD; mainly just resetting over and over but only in flight.  Tried several noise filters on 5V and 12V, and it didn't help.  It turned out to be that it didn't like 12V straight from the battery because of less than 12V and fluctuations.  Right now I have mine disconnected, but I think that an up/down regulator (so it can make 12.0V from 12.6V or 10.5V) would fix it.
Title: Re: next steps to optimizing multirotor setup
Post by: glenneaux on January 28, 2019, 02:39:52 pm
Similar problems with my OSD; mainly just resetting over and over but only in flight.  Tried several noise filters on 5V and 12V, and it didn't help.  It turned out to be that it didn't like 12V straight from the battery because of less than 12V and fluctuations.  Right now I have mine disconnected, but I think that an up/down regulator (so it can make 12.0V from 12.6V or 10.5V) would fix it.

I'm about to embark on fixing up my OSD.....

Do I buy something else or get this one sorted.

I've got a micro minimosd, and it's powered by 5v from the FC per librepilot doc.... I use the USB com bridge to program it.

Somethings I considered were bad 5v and bad earth arrangements...

The ground goes straight to the FC which grounds via the bec in one of the four ESCs

The 5V is the same source as the FC.

I am going to bench test with / without the camera and vtx to try and confirm everything else is ok.


I currently have video passing through the OSD but no OSD at all. Last time I flew I had a video reset but only once.

Tonight I disconnected my camera and still had no OSD which was strange...

I then tried to talk to the OSD with its config software and still nothing.

Do I pursue this minimosd or do I buy a full size minimosd that comes in a case which will solve another problem...