Velos 880 pixhawk build

Oh yeah. It’s set with the SERVOx_FUNCTION. I would use like channel 10 instead though. Channel 6 is reserved for a lot of different tuning options in ardupilot. The one a lot of heli pilots use is setting WPNAV_SPEED with channel 6.

Well 6 didn’t work as that is what’s coming out as 8 for throttle. However, now that I know about changing channels to pass through I was able to just set my idle up switch to operate 9, set 9 for pass through, and set 9 as input for flight mode. Everything works as it should and it’s good to go but now with a gov! Back to the plan of getting a good hover in with it in stabilize mode and posting the log.

and as I look back on that I realize I still had them mixed…

All good now, channel 8 is on a switch and not doing anything but turning on and off and is not mixed in any way. Ready to fly!

Excellent. That should work. There won’t be any tuning issues with the Pixhawk - that’s all done in the FBL unit for the most part, as long as you feed it enough feedforward so the FBL unit works right. Looking forward to hearing about the first flight with it!

Hello,

I am also interested what the result would be.

Which firmware is recommeded for this work?
3.5.5 or 3.6b or custom?

3.5.5 would be the best. We do have a firmware build now that has been tested with the new 5-point spline smoothed throttle curve that will work better for piston engines. Feel free to test it if you want (select the ArduHeli 3.5.5 build). This will be going into Copter 3.6-dev soon.

https://github.com/ChristopherOlson/ArduHeli/releases

Instructions on setting it up are here - fourth video in the series…
Edit:
These videos are now on the official ArduPilot YouTube channel - they will be going into the wiki as soon as Luis and I get that job done - this is the fourth one on the Mode 3 throttle curves in the new firmware:

Thank you. This is very helpful to grasp the process.

Chad,
Did you ever get this working? I have all channels mapped and midopints set but my 2 collective channels are only mapping about 30% of their full range. I have checked my mixhawk input and output and the output values are drastically lower than the inputs. I have tried adjusting the SERVOX_MAX values and the H_CYC_MAX values. I have also tried reloading the defaults and then restoring all values from a saved config except the H_ values. Nothing seems to make any difference to the Pixhawk outputs on these channels. I am running 3.5.5

Try H_COL_MAX and MIN

It should be within 1000 to 2000 range.

Hi,

Thanks for the response but neither H_COL_MAX/MIN or H_CYC_MAX make any difference. It is my understanding that its H_CYC_MAX that is the problem here as I’m trying to adjust both the roll and nose pitch channels (cyclic on a heli) by the same amount. Also, the physical manifestation of this is a small range of angular movement in the swash plate.

Any help would be appreciated

A little more information here:
If I set the H_CYC_MAX to 300, RC input range of 1000 (min) -2000 (max) to the pixhawk maps to 1492 (min) -1552 (max).
If I set the H_CYC_MAX to 4500 (default) the outputs are 1390 (min) and 1638 (max). This change and the fact that the aircraft pitch and roll channels are showing the same results suggests that H_CYC_MAX is the correct parameter and that it is affecting the correct characteristics.
However, if I set H_CYC_MAX to its maximum of 18000 to really try and get some movement range, the min and max outputs are still only 1390 and 1638.
It seems there is a hard limit being imposed on the outputs by something else.

Would you be able to post the param file from your setup so we could take a look at it? The problem should be evident in the params. If everything is set wide open and it won’t go to full value, it could be a problem with the rate controller settings.

In the mean time, here is some settings from a Velos 880 setup with a dowstream FBL unit (Spartan Vortex) to handle the four-servo swashplate. These are the servo settings - I extracted these from a log with grep…
PARM,226647251,FRAME_CLASS,6
PARM,226647322,SERVO1_MIN,1000
PARM,226647393,SERVO1_MAX,2000
PARM,226647465,SERVO1_TRIM,1515
PARM,226647793,SERVO1_REVERSED,0
PARM,226647889,SERVO1_FUNCTION,33
PARM,226647966,SERVO2_MIN,1000
PARM,226648050,SERVO2_MAX,2000
PARM,226648244,SERVO2_TRIM,1515
PARM,226648348,SERVO2_REVERSED,1
PARM,226648738,SERVO2_FUNCTION,34
PARM,226648820,SERVO3_MIN,1000
PARM,226648903,SERVO3_MAX,2000
PARM,226649211,SERVO3_TRIM,1515
PARM,226649411,SERVO3_REVERSED,0
PARM,226649524,SERVO3_FUNCTION,35
PARM,226649899,SERVO4_MIN,410
PARM,226676472,SERVO4_MAX,1080
PARM,226676827,SERVO4_TRIM,790
PARM,226676947,SERVO4_REVERSED,0
PARM,226677086,SERVO4_FUNCTION,36

These are the H_ settings and this particular helicopter is using the new throttle curve so those may be a bit different from yours:
PARM,226608439,H_COL_MIN,1400
PARM,226608747,H_COL_MAX,1920
PARM,226608773,H_COL_MID,1510
PARM,226608804,H_SV_MAN,0
PARM,226608831,H_RSC_SETPOINT,700
PARM,226608909,H_RSC_MODE,3
PARM,226608938,H_LAND_COL_MIN,60
PARM,226609156,H_RSC_RAMP_TIME,2
PARM,226609192,H_RSC_RUNUP_TIME,3
PARM,226609222,H_RSC_CRITICAL,400
PARM,226609254,H_RSC_IDLE,0
PARM,226609373,H_CYC_MAX,3500
PARM,226609412,H_SV_TEST,0
PARM,226609445,H_RSC_SLEWRATE,0
PARM,226609719,H_RSC_THRCRV_0,500
PARM,226609855,H_RSC_THRCRV_25,500
PARM,226609935,H_RSC_THRCRV_50,500
PARM,226609972,H_RSC_THRCRV_75,750
PARM,226610010,H_RSC_THRCRV_100,1000
PARM,226610056,H_SV1_POS,90
PARM,226610164,H_SV2_POS,0
PARM,226610203,H_SV3_POS,180
PARM,226610314,H_TAIL_TYPE,0
PARM,226610363,H_SWASH_TYPE,1
PARM,226610404,H_GYR_GAIN,0
PARM,226610445,H_PHANG,0
PARM,226610487,H_COLYAW,0
PARM,226610830,H_FLYBAR_MODE,1
PARM,226610873,H_TAIL_SPEED,500
PARM,226610986,H_GYR_GAIN_ACRO,0

These are the RC settings and they are not messed with - they are left at the calibrated value acquired during RC calibration
PARM,226695982,RC1_MIN,997
PARM,226696157,RC1_TRIM,1508
PARM,226696482,RC1_MAX,2012
PARM,226697106,RC1_REVERSED,0
PARM,226697361,RC1_DZ,20
PARM,226697835,RC2_MIN,989
PARM,226698040,RC2_TRIM,1505
PARM,226698286,RC2_MAX,2020
PARM,226698921,RC2_REVERSED,0
PARM,226699365,RC2_DZ,20
PARM,226699678,RC3_MIN,988
PARM,226700004,RC3_TRIM,992
PARM,226700334,RC3_MAX,2019
PARM,226700809,RC3_REVERSED,0
PARM,226701222,RC3_DZ,10
PARM,226701681,RC4_MIN,990
PARM,226702107,RC4_TRIM,1505
PARM,226702379,RC4_MAX,2018
PARM,226702937,RC4_REVERSED,0
PARM,226703180,RC4_DZ,15

These are the rate controller settings - note especially the VFF settings.
PARM,226547390,ATC_RATE_FF_ENAB,1
PARM,226573462,ATC_RAT_RLL_P,0
PARM,226573508,ATC_RAT_RLL_I,0
PARM,226573686,ATC_RAT_RLL_D,0
PARM,226573959,ATC_RAT_RLL_VFF,0.349999994
PARM,226574007,ATC_RAT_RLL_IMAX,0
PARM,226574060,ATC_RAT_RLL_FILT,20
PARM,226574107,ATC_RAT_RLL_ILMI,0
PARM,226574157,ATC_RAT_PIT_P,0
PARM,226574207,ATC_RAT_PIT_I,0
PARM,226574258,ATC_RAT_PIT_D,0
PARM,226574501,ATC_RAT_PIT_VFF,0.349999994
PARM,226574778,ATC_RAT_PIT_IMAX,0
PARM,226574937,ATC_RAT_PIT_FILT,20
PARM,226574991,ATC_RAT_PIT_ILMI,0
PARM,226575056,ATC_RAT_YAW_P,0.150000006
PARM,226575233,ATC_RAT_YAW_I,0.0149999997
PARM,226575291,ATC_RAT_YAW_D,0.00600000005
PARM,226575478,ATC_RAT_YAW_VFF,0.0599999987
PARM,226575671,ATC_RAT_YAW_IMAX,0.300000012
PARM,226575732,ATC_RAT_YAW_FILT,20
PARM,226575792,ATC_RAT_YAW_ILMI,0.0299999993

So, as you can see, the servo limits are set in the Pixhawk and the FBL unit “captures” that so it knows what min and max are using its setup procedure. The FBL unit only handles rate control. The Pixhawk handles attitude control. No settings are made on the RC side. No mixing is done in the Pixhawk (H_SWASH_TYPE = 1) - that is done in the FBL unit. Flybar mode (H_FLYBAR_MODE = 1) is turned on so you have direct-thru control in Acro to the rate controller (FBL unit).

For downstream FBL unit I usually like to set the pitch and roll VFF to 0.4 or 0.5. But 0.35 works on this one because it is a UAV only. For 3D with your FBL unit you’d probably want to investigate setting that to get more servo travel up to probably 0.5

Hope this helps.

Hi Chris,

An update and another support request. After your excellent videos and pointers we managed to get our small electric 450 flying pretty well and even got it to RTL in what would have otherwise been a bit of a fly away. We’ve been working to slowly upgrade. The next step is installation on a 700 Nitro before trying things out on a custom built 1000.

I started the installation process again in order to ensure that I was following your instructions and cement the steps in my head. We are now using a Pixhawk 2 on the 700 along with a spartan FBL. We initially flew in Acro mode to ensure the aircraft was functioning correctly, all channels were in the right order etc and the aircraft was mechanically sound. We then switched to Stablilise and everything seemed good. Even I could fly it (I’m not a heli pilot) and after a little tweaking we managed to almost completely eliminate the tail wag.

Our problems arose when we switched to Loiter. As soon as we changed flight mode the aircraft RAPIDLY started to oscillate in the vertical axis.

We had a short call with Tridge yesterday and he made a number of suggestions but said that we should probably get back in touch with you and/or Bill Guyer (spelling?). Tridge explained that you are the current heli experts but gave us the following suggestions.

Lower accel_z_p, pos_z_p and vel_z_p

He suggested halving each in turn and then inclreasing at 10% intervals.

We have done this initially on accel_z_p and vel_z_p but cannot test fly until later in the week. In the mean time I have attached a log and parameters file for you to look at and was hoping you might be able to give us some more pointers. The RTL times in the log are 12:58:38 and 12:59:30.

tlog file: https://www.dropbox.com/s/uok8jrtxx4rpt73/2018-05-19%2012-54-59.tlog?dl=0
Parameters file: https://www.dropbox.com/s/89nd78nceicr5k8/2018-05-19%2012-54-59.param?dl=0

I would like to add these parameters to a CH6 tuning knob our our TX so we can tweak inflight. A cursory look however on the extended tuning page doesn’t seem to offer these parameters as an assignment to CH6 tuning. Have I missed something or is there another way of doing this?

As an aside, accel_z_p was initially 0.3 which we have since halved as per Tridge’s instructions. Even this value however falls outside the stated range in mission planner of 0.5-1.5. Is this an artefact of multi-rotors?

Thanks

Jon

Hi Jon,
The tlog is good for a lot of things, but for something like this Bill and I will need the logs off the microSD card in the flight controller to look at attitude controller and servo outputs, and so on.

Like @tridge said, the ACCEL_Z_P can cause a collective over-reaction. But I think you have a different problem in this case.

From your params the settings are pretty messed up for a downstream FBL unit. In these settings, for downstream FBL, the RAT_RLL and RAT_PIT P, I, and D’s, should all be set to zero. And RAT_RLL and RAT_PIT VFF’s should be at LEAST 0.3 The rest of the rate tuning is done in your FBL unit, and I’m suspecting this is 99% of the problem with why Loiter isn’t working right. The FBL unit is fighting the rate controller in the Pixhawk, and neither one knows what the other is doing.

Basically, what we’re doing is shutting the rate controller off in the Pixhawk and just feed the attitude controller outputs to the FBL unit using feedforward.

These are the current settings you have:
|ATC_RAT_RLL_P|0.024|
|ATC_RAT_RLL_I|0.6|
|ATC_RAT_RLL_D|0.001|
|ATC_RAT_RLL_VFF|0.06|
|ATC_RAT_RLL_IMAX|1|
|ATC_RAT_RLL_FILT|20|
|ATC_RAT_RLL_ILMI|0|
|ATC_RAT_PIT_P|0.024|
|ATC_RAT_PIT_I|0.6|
|ATC_RAT_PIT_D|0.001|
|ATC_RAT_PIT_VFF|0.06|
|ATC_RAT_PIT_IMAX|1|
|ATC_RAT_PIT_FILT|20|
|ATC_RAT_PIT_ILMI|0|

One more thing that needs to be set for downstream FBL is the H_FLYBAR_MODE must be set to 1 so you have direct-thru control in Acro flight mode.

And then these settings for the tail servo look REALLY soft. Does this even hold the tail at all on a 700-class nitro? This looks like the defaults to me.
|ATC_RAT_YAW_P|0.18|
|ATC_RAT_YAW_I|0.12|
|ATC_RAT_YAW_D|0.003|
|ATC_RAT_YAW_VFF|0.024|
|ATC_RAT_YAW_IMAX|1|
|ATC_RAT_YAW_FILT|20|
|ATC_RAT_YAW_ILMI|0|

It is possible you are using the Vortex for rudder control?

In working with Aris at Velos Rotors on the Velos UAV heli flying the ArduPilot stack with a PH2,1, Aris noted that it works best to connect the rudder directly to the Pixhawk. The Vortex has a heading hold and it can’t be turned off. So there is an interaction problem between the yaw controllers in the two units. So he recommends hooking yaw servo direct to Pixhawk. And tuning the yaw params in Pixhawk to hold the tail decent.

On the cyclic servos he noted another problem. In acro the fbl unit initializes correctly, but in stabilize it doesn’t. The stabilize controller in ArduPilot levels the swashplate (in respect to the earth) and this messes up the initialization of the gyro in the fbl unit. So the pilot has to twiddle the sticks to level the swashplate before takeoff.

So @bnsgeyer wrote a patch for Aris that holds the servos at trim value for 5 seconds at boot time so the FBL unit can properly initialize its gyros. We have a special ArduHeli 3.5.6 build with this feature in it. You may want to consider loading this firmware for your downstream FBL unit. You can get it here for the PH2
https://github.com/ChristopherOlson/ArduHeli/releases/download/v3.5.6/ArduHeli-3.5.6-v3_servo_delay.px4

We don’t officially support downstream FBL units, as there is so many different ones we can’t. But using one is an option a lot of professional pilots want because it provides a “bailout” in Acro flight mode that ArduPilot does not otherwise have in it. So we like to make ArduPilot play nicely with them so the advanced features in the FBL unit can be used.

1 Like

Thank Chris,

Given all that information I think we’re gonna get rid of the FBL all together. Our tail servo is running at a frame rate or 760 unlike the rest that are 1520. Is this something we can configure in Ardupilot?

Now that the FBL is out of the loop we are basically losing our fallback option of switching back to Acro and taking control if our PH settings are way out. Given this, do you have a set of parameters we could use as a starting point for our first flight?

Thanks again

Jon.

Hi Jon,
Yes, ArduPilot can be configured for your 760 servo. Just make sure you set the max, min and trim values on SERVO4 BEFORE you hook it up, or you will burn it out.

You will have to do all the normal mechanical setup, of course. But these settings for the rate and attitude controller should fly your 700 out of the gate. You may have to adjust the VFF’s a bit for “pilot feel” in Stabilize. And turn off the D gain if you get any oscillation in the roll or pitch axes - but with a nitro I’ll bet you’re not too worried about low headspeed like most electric pilots are. So I’m betting these will fly it fine - I use these same settings in my gassers.

ATC_ACCEL_P_MAX 52000
ATC_ACCEL_R_MAX 52000
ATC_ACCEL_Y_MAX 20000

ATC_ANG_PIT_P 4.5
ATC_ANG_RLL_P 4.5
ATC_ANG_YAW_P 4.5

ATC_RATE_FF_ENAB 1

ATC_RAT_PIT_D 0.0008
ATC_RAT_PIT_FILT 12
ATC_RAT_PIT_I 0.35
ATC_RAT_PIT_ILMI 0.04
ATC_RAT_PIT_IMAX 0.44
ATC_RAT_PIT_P 0.04

ATC_RAT_PIT_VFF 0.18
ATC_RAT_RLL_D 0.0005
ATC_RAT_RLL_FILT 13
ATC_RAT_RLL_I 0.32
ATC_RAT_RLL_ILMI 0.03
ATC_RAT_RLL_IMAX 0.44
ATC_RAT_RLL_P 0.035
ATC_RAT_RLL_VFF 0.17

For the yaw settings, adjust the P and D to suit your servo if it “tail wags”.
ATC_RAT_YAW_D 0.007
ATC_RAT_YAW_FILT 20
ATC_RAT_YAW_I 0.30
ATC_RAT_YAW_ILMI 0.01
ATC_RAT_YAW_IMAX 0.33
ATC_RAT_YAW_P 0.28
ATC_RAT_YAW_VFF 0.12

This one here you can reduce to 3000 or 4000 if you want to slow the yaw down a bit in auto flight mode.
ATC_SLEW_YAW 6000

Hi Jon,
Really glad to see you’re getting help from @ChrisOlson. He is definitely the right person.
I’d just offer a comment based on the photo. I doubt that isolation system is good enough for a gas heli. If you do continue with that system then try a run up on the ground and be sure that you don’t get any IMU clipping. You can check the VIBE message in the DF logs for that, but only if you have INS_FAST_SAMPLE=1 to make sure you’re doing fast sampling (otherwise the IMU hides the clipping internally)
Also, make sure you disable the ACRO_TRAINER stuff for a first flight if using ACRO as a fallback mode. With ACRO_TRAINER enabled ACRO mode is sensitive to attitude estimate, which is sensitive to vibration. With ACRO_TRAINER off its still a bit sensitive to really bad vibes, but a lot less than with it on.
Cheers, Tridge

Wow, thanks tridge for pointing that out! I didn’t see that in the photo until you mentioned it just now.

Jon, tridge is right on that. The PH2.1 has pretty good internal damping. If you put it on a rubber mount like that, it will make it worse. It might seem counter-intuitive but I run my Pixhawks on my piston helicopters just stuck to the FBL unit tray or ESC tray with regular old velcro. Can’t see it real good in this photo of my Raptor 716 but that’s what’s under the PH2.1

100_0156

The velcro doesn’t let the flight controller move around too much so the internal damping of the IMU’s can work. I put one strip across one end about maybe 1cm wide. And just a 1 cm square in the middle on the other end of the carrier board. Vibes less than 8 with that setup and no clipping. And no need to add extra weight to the PH2.1.

Massive thanks to you both for your help and quick responses. Tridge, after your advice on the dampening the other day we removed our vibration platform as discussed and tried with 4 foam blocks. We spun up on the ground to full throttle (no blades) But the vibration was REALLY bad to the point that at times the artificial horizon started spinning out of control. I swapped the platform back in and repeated and with the platform there’s currently very little movement on the mission planner hud vibration bars throughout the entire throttle range. Maybe we have a lucky configuration that has isolated the controller somehow.

It is possible what you have will work, but sometimes those jello boards will allow too much movement of the FC. You should have a log of that runup and you can look at the vibe and IMU messages to see how it fared for vibration, clipping and IMU aliasing. The Cube is a little more of a challenge sometimes because the mass of the Cube is well above the mounting point of the carrier board. So if the carrier board can move significantly it can cause worse vibes (at an undesirable frequency) than having the carrier mounted relatively stiff.

For all piston helicopters I like to run them on the throttle curve and adjust the curve so it varies the headspeed. On all of them I’ve always found a “sweet spot” where the engine likes to run and is the smoothest, and that’s where I set my governor to (if it’s a reasonable headspeed). If I don’t like the headspeed then I re-tune the engine until I get a combo I like. Properly tuned, my piston heli’s are smoother than my electrics.