I’m fairly new to arducopter and I’m having some trouble getting a hexacopter to behave properly. It flies great on stabilize and altitude hold, but if I change to loiter or RTL it will start oscillating back and forth with the oscillations only growing until I switch back to stabilize or altitude hold when they stop. This happens when I try to land also where the hexacopter will start to descend fine but then start oscillating to the point where it will just crash into the ground. Here’s my pitch graph from the flight log. You can see the sudden big jumps in pitch when I try switching to loiter or RTL.
That log has almost no useful information in it - I suggest you set LOG_BITMASK,141310
Please also describe the craft: prop size, LiPo battery cells, wheel-base and so on.
What flight controller do you have and what version Arducopter?
I’m flying a 550 mm wheel-base hexacopter with 10 inch props, a Pixhawk 4 mini flight controller/ external Pixhawk GPS with Arducopter V4.0.3. Currently using 3S, 3300 mAh LiPo cells.
OK, set that log bitmask and do another flight, post a link to the .bin log for us to check out.
Sorry, I didnt see that you already described the craft earlier,
It’s very unstable the whole time.
You’ve got the best battery on Earth though! The copter only draws about 2 amps and the battery voltage goes up over time
You might have to do some work with the battery monitor to get all that correct.
Depending on what power-brick or power distribution board you’re using, these might be the most likely values you need:
BATT_VOLT_MULT,18.182
BATT_AMP_PERVLT,36.364
Check this discussion for other settings you might need:
And set or adjust all these too:
BATT_ARM_VOLT,11
BATT_CRT_VOLT,10.5
BATT_LOW_VOLT,10.8
BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,2
MOT_BAT_VOLT_MAX,12.6
MOT_BAT_VOLT_MIN,9.9
The biggest problems are the vibrations
Your X and Y vibrations are poor - you’ll need to really examine prop balance.
Your Z vibrations are very bad - you’ll need to look for a number of things:
props overflying the base plates (probably not with 10inch props) or very close to the arms - maybe space the motors up higher away from the arms
flight controller vibration isolation
wires pulling or rubbing on the flight controller
wires hanging loose
wires pulled too tight
anything else loose anywhere
Maybe give us a photo.
Once vibrations are fixed give us the log of another test flight and we’ll be able to see if your PID’s are working OK. Preferably a .bin log file rather than a .log file.
The pixhawk is mounted on 3M foam pads. I still haven’t been able to figure out the correct voltage monitoring parameters either, when I tried the changes you recommended I ended up getting around 2V. I’ve tried autotuning a few times to tune the pids but the autotune either won’t even start when I initiate it, or it won’t finish after 10 minutes when my battery dies (and I’ve tried doing one axis at a time as well).
Secure the GPS cable too, and that powerbrick. Even tuck in the battery balance lead somewhere so it doesnt flap around.
For the voltage and current monitoring, try setting the Monitor, Sensor and HW Ver as pictured:
…and reboot !
This should set these, you can even set them manually (and then reboot)
BATT_CURR_PIN 1
BATT_VOLT_PIN 0
Then you should be able to set reasonable BATT_AMP_PERVLT and BATT_VOLT_MULT values.
Let us know how that goes.
To have a go at the shaky flight, try these:
ATC_INPUT_TC,0.22 (smoother RC input)
PSC_ACCZ_I,0.6
PSC_ACCZ_P,0.3
ATC_RAT_PIT_P,0.12
ATC_RAT_PIT_I,0.12
ATC_RAT_PIT_D,0.005
ATC_RAT_RLL_P,0.12
ATC_RAT_RLL_I,0.12
ATC_RAT_RLL_D,0.005
ATC_THR_MIX_MAN,0.5 (since it seems to fly)
If these work out OK you can move on to Autotune.
Make sure you put in all the correct battery failsafe options too:
BATT_ARM_VOLT,11
BATT_CRT_VOLT,10.5
BATT_LOW_VOLT,10.8
BATT_FS_CRT_ACT,1
BATT_FS_LOW_ACT,2
MOT_BAT_VOLT_MAX,12.6
MOT_BAT_VOLT_MIN,9.9
People tend to ignore them because the prevent arming or cause a battery failsafe unexpectedly, when in reality they should fix their battery monitor settings.
Wow! So much better on the stability. Loitering, landing and completing missions without any oscillating now. The battery monitor still isn’t accurate, and it activates the battery failsafe after about 3 minutes when the actual voltage is around 11.5 still, but flying much better overall. Thanks for the help! https://drive.google.com/file/d/1ccJS1tCydMaxuWmf_rJo09blrRbAaulu/view?usp=sharing