Tricopter pre-arm tilt motor angle

I’m setting up a Tricopter with a kakute F743 slim and all works well.
However I have some issues with the tilt motor angle.

When I power up the Tricopter the tilt motor seems to go to it’s minimum angle (-30 degrees) probably pwm signal of 1000.
When I arm the Tricopter it finally goes to neutral and starts working.
I do not want to arm it when it is angled at -30 degrees because of fear of prop striking the ground.

Is there a way to set the angle of the tilt servo before arming so it is horizontal when the prop starts spinning?
Or should I disable that the motors spin upon arming?

Thanx

Peter

@OldRaven,

Txs for the report. Any chance you could provide an onboard log? I’d like to check the SERVOx_TRIM value in particular for the channel attached to the servo.

1 Like

I did notice from the start weird behaviour with SERVO7_TRIM.
Every time I set the trim to 1500 , after I disconnect and reboot the flightcontroller it sets it back to 1000.
Which would explain the servo position on reboot.

I’ve attached a log file.
It’s not in flying condition so has no GPS and I disabled all the checks so you can see what happens.
Logging is set to also log on disarm.
What I did is boot the FC, the armed. Wiggled the yaw stick. and also lifted the tricopter and wiggled it to show the tail servo working.
Hope this helps, if you need more info just let me know.

https://1drv.ms/u/s!AnxgjqWljH_NyWp2jOrI7O1e22SM?e=aeJxlr

Peter

Hi, I have the exact same problem with a Matek H743. I found a Workaround (more than a solution) by changing ESC type from Dshot to OneShot (work also with Normal). As soon as I set Dshot (wether 150, 300 or 600) the SERVO7_TRIM on my tricopter goes to 1000 and even if I set it back to 1500, it goes down to 1000 after reboot.

1 Like

I can see how this might happen. Please can you post all your SERVO_* and MOT_* settings?

I use oneschot 150, so this workaround does not seem to work for me :wink:

Hi Andy,

You can see all the MOT* and SERVO* settings in the OneDrive link which is a log file of the tricopter.

Here are mine:
MOT_:


SERVO_
:
image

1 Like

Are you running dshot on all three motors? It would help to know what the RCOut message is on startup

Had a similar issue with my tricoper. The workaround I found is to set SERVO_BLH_AUTO=0 but it seems it’s already the case for you.

1 Like

Correction, I was running DSHOT125.

So I tried what Alex did and set my MOT_PWM_TYPE to ONESHOT125
Then reset my SERVO7_TRIM back to 1500.

Upon reboot now the servo stays in the center position before arming like it should.
So is this DSHOT related?
Also can you set the PWM type for every motor seperate? Since the tilt servo is configured as Motor7 does this mean that it also uses dshot on the servo output when the other motors are configured for dshot?

Its certainly dshot related because the dshot code explicitly sets the min/max/trim on digital outputs. What I’m not sure about is how this is supposed to work on tricopter. Certainly I don’t think you can have the servo motor in the same group as the other motors if using dshot - and I assume the server motor needs to be PWM?

1 Like

Hi, on my config (Matek H743), Servo7 is on a separate group (Group3) that is PWM associated at startup. So it should not be affected by Dshot that is only associated with outputs 1 to 6 (ie Group1 and Group2):
image
Here are Groups configuration on Matek H743:

Ok, I have that board. Please send me your parameter file - I will load up and see if I can reproduce.

Here is my parameter file.
It’s currently set to oneshot and holding the servo centered on startup.
When you set it to dshot servo7-trim will pop back to 1000

Like alex said, the tailservo is in it’s own timer group and on startup you can see that it’s using
pwm. 1-6 is now using oneshot.

Tri_4_1Dev.param (19.9 KB)

tri_boot

Sent my parameters file directly to you by message.

Ok, I can reproduce this, the issue is that the yaw servo is added into the motor mask. I don’t think we should be doing this, but don’t know enough about how Tri is supposed to work to say whether taking it out is a good idea.

The way to fix this for your configurations is to not set MOT_PWM_TYPE but instead use SERVO_BLH_MASK and SERVO_BLH_OTYPE to only enable the motors that you want for dshot.

@rmackay9 I think we could probably do this and make life easier for people without breaking things. It would mean the yaw servo was no longer in the safety mask, but I think that is ok:

diff --git a/libraries/AP_Motors/AP_MotorsTri.cpp b/libraries/AP_Motors/AP_MotorsTri.cpp
index 690edfd333..efdbe2cb4f 100644
--- a/libraries/AP_Motors/AP_MotorsTri.cpp
+++ b/libraries/AP_Motors/AP_MotorsTri.cpp
@@ -129,8 +129,7 @@ uint16_t AP_MotorsTri::get_motor_mask()
     // tri copter uses channels 1,2,4 and 7
     uint16_t motor_mask = (1U << AP_MOTORS_MOT_1) |
                           (1U << AP_MOTORS_MOT_2) |
-                          (1U << AP_MOTORS_MOT_4) |
-                          (1U << AP_MOTORS_CH_TRI_YAW);
+                          (1U << AP_MOTORS_MOT_4);
     uint16_t mask = motor_mask_to_srv_channel_mask(motor_mask);

     // add parent's mask 
1 Like

Thanx!

I now set
MOT_PWM_TYPE = 0
SERVO_BLH_OTYPE = 5 (for DSHOT300)
SERVO_BLH_MASK enabled on channels 1 , 2 and 4

The servo now stays centered before arming. and does not loose its SERVO7_TRIM value

When I check the messages rcout for 1-6 in now set to dshot300
and 7-13 is PWM.

I will finish the build and start testing in the air!

1 Like

Quick update.

Did a first testflight and all works well.

Waiting for better weather this week to do alt calibration and a first go at autotune for the yaw axis.

Will report back later. :slight_smile:

1 Like

master is now fixed so that you can do this with MOT_PWM_TYPE - this fix will probably be in the next beta as well

2 Likes